arya-narrable commited on
Commit
bc6f1a1
1 Parent(s): 948da2f
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -16,5 +16,12 @@ def chat(message, model, tokenizer):
16
 
17
  model, tokenizer = load_model()
18
 
19
- iface = gr.Interface(fn=lambda message: chat(message, model, tokenizer), inputs="text", outputs="text")
20
- iface.launch()
 
 
 
 
 
 
 
 
16
 
17
  model, tokenizer = load_model()
18
 
19
+ # Gradio interface to handle text input
20
+ iface = gr.Interface(
21
+ fn=lambda message: chat(message, model, tokenizer),
22
+ inputs="text",
23
+ outputs="text"
24
+ )
25
+
26
+ # Expose an API endpoint
27
+ iface.launch(server_name="0.0.0.0", server_port=7860, enable_queue=True)