Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
| 55 |
fn=query_vectara,
|
| 56 |
inputs=[
|
| 57 |
-
gr.inputs.
|
| 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()
|