Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,19 +51,17 @@ 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 |
-
|
57 |
-
gr.inputs.File(label="Upload a file")
|
58 |
-
],
|
59 |
examples=["Hello", "What is the weather today?", "Tell me a joke"],
|
60 |
title="Vectara Chatbot",
|
61 |
description="Ask me anything using the Vectara API!",
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
autofocus=True
|
68 |
)
|
69 |
|
|
|
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=[gr.File(label="Upload a file")], # Use `gr.File` directly
|
|
|
|
|
57 |
examples=["Hello", "What is the weather today?", "Tell me a joke"],
|
58 |
title="Vectara Chatbot",
|
59 |
description="Ask me anything using the Vectara API!",
|
60 |
+
submit="Send", # Use `submit` instead of `submit_btn`
|
61 |
+
stop="Stop", # Use `stop` instead of `stop_btn`
|
62 |
+
retry="Retry", # Use `retry` instead of `retry_btn`
|
63 |
+
undo="Undo", # Use `undo` instead of `undo_btn`
|
64 |
+
clear="Clear", # Use `clear` instead of `clear_btn`
|
65 |
autofocus=True
|
66 |
)
|
67 |
|