Spaces:
Running
Running
Tim Seufert
commited on
Commit
·
a08e0b6
1
Parent(s):
eae5b8f
chatwindow_design_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,21 +67,6 @@ def respond(message, image, chat_history):
|
|
67 |
)
|
68 |
|
69 |
|
70 |
-
import time
|
71 |
-
import gradio as gr
|
72 |
-
|
73 |
-
demo = gr.ChatInterface()
|
74 |
-
chatbot = gr.Chatbot()
|
75 |
-
msg = gr.Textbox
|
76 |
-
flagging_mode="manual",
|
77 |
-
flagging_options=["Like", "Spam", "Inappropriate", "Other"],
|
78 |
-
save_history=True,
|
79 |
-
)
|
80 |
-
|
81 |
-
if __name__ == "__main__":
|
82 |
-
demo.launch()
|
83 |
-
|
84 |
-
|
85 |
#with gr.Interface() as iface:
|
86 |
#iface.add_textbox("Message", lines=7, label="Message")
|
87 |
#iface.add_image("Image")
|
|
|
50 |
return "", chat_history.append((message, f"Error: {str(e)}"))
|
51 |
|
52 |
# Create Gradio interface
|
53 |
+
with gr.Blocks() as demo:
|
54 |
chatbot = gr.Chatbot()
|
55 |
msg = gr.Textbox()
|
56 |
img = gr.Image(type="filepath")
|
|
|
67 |
)
|
68 |
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
#with gr.Interface() as iface:
|
71 |
#iface.add_textbox("Message", lines=7, label="Message")
|
72 |
#iface.add_image("Image")
|