Spaces:
Sleeping
Sleeping
Tim Seufert
commited on
Commit
·
74adf7b
1
Parent(s):
eba68bc
update
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def respond(message, image, chat_history):
|
|
| 50 |
return "", chat_history.append((message, f"Error: {str(e)}"))
|
| 51 |
|
| 52 |
# Create Gradio interface
|
| 53 |
-
|
| 54 |
chatbot = gr.Chatbot()
|
| 55 |
msg = gr.Textbox()
|
| 56 |
img = gr.Image(type="filepath")
|
|
@@ -67,16 +67,19 @@ def respond(message, image, chat_history):
|
|
| 67 |
)
|
| 68 |
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
return "", chat_history.append((message, f"Error: {str(e)}"))
|
| 51 |
|
| 52 |
# Create Gradio interface
|
| 53 |
+
with gr.ChatInterface() as demo:
|
| 54 |
chatbot = gr.Chatbot()
|
| 55 |
msg = gr.Textbox()
|
| 56 |
img = gr.Image(type="filepath")
|
|
|
|
| 67 |
)
|
| 68 |
|
| 69 |
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
#with gr.Interface() as iface:
|
| 74 |
+
#iface.add_textbox("Message", lines=7, label="Message")
|
| 75 |
+
#iface.add_image("Image")
|
| 76 |
+
#iface.add_textbox("Response", lines=7, label="Response")
|
| 77 |
+
#iface.launch()
|
| 78 |
+
#fn=respond,
|
| 79 |
+
#inputs=[gr.Textbox(lines=7, label="Message"), gr.Image(label="Image")],
|
| 80 |
+
#outputs=[gr.Textbox(lines=7, label="Response")],
|
| 81 |
+
#title="SimplestMachine",
|
| 82 |
+
#description="A simple chatbot interface powered by Cohere.",
|
| 83 |
+
#allow_screenshot=True,
|
| 84 |
+
#allow_file_upload=True,
|
| 85 |
+
#theme="huggingface",
|