Tonic commited on
Commit
cf7f506
·
1 Parent(s): a1409c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -51,14 +51,15 @@ def query_vectara(question, chat_history, uploaded_file):
51
  return f"{upload_status}\n\nResponse from Vectara API: {response.text}"
52
 
53
  # Create a Gradio ChatInterface
54
- iface = gr.Interface(
55
  fn=query_vectara,
56
  inputs=[
57
- gr.inputs.Text(label="Ask a question:"),
58
  gr.inputs.File(label="Upload a file")
59
  ],
60
  outputs=gr.outputs.Textbox(),
61
- examples=["Hello", "What is the weather today?", "Tell me a joke"],
62
  title="Vectara Chatbot",
63
  description="Ask me anything using the Vectara API!"
64
  )
 
 
 
51
  return f"{upload_status}\n\nResponse from Vectara API: {response.text}"
52
 
53
  # Create a Gradio ChatInterface
54
+ iface = gr.ChatInterface(
55
  fn=query_vectara,
56
  inputs=[
57
+ gr.inputs.Textbox(label="Ask a question:"),
58
  gr.inputs.File(label="Upload a file")
59
  ],
60
  outputs=gr.outputs.Textbox(),
 
61
  title="Vectara Chatbot",
62
  description="Ask me anything using the Vectara API!"
63
  )
64
+
65
+ iface.launch()