Tim Seufert commited on
Commit
74adf7b
·
1 Parent(s): eba68bc
Files changed (1) hide show
  1. app.py +17 -14
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
- #with gr.Blocks() as demo:
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
- with gr.Interface() as iface:
71
- iface.add_textbox("Message", lines=7, label="Message")
72
- iface.add_image("Image")
73
- iface.add_textbox("Response", lines=7, label="Response")
74
- iface.launch()
75
- fn=respond,
76
- inputs=[gr.Textbox(lines=7, label="Message"), gr.Image(label="Image")],
77
- outputs=[gr.Textbox(lines=7, label="Response")],
78
- title="SimplestMachine",
79
- description="A simple chatbot interface powered by Cohere.",
80
- allow_screenshot=True,
81
- allow_file_upload=True,
82
- theme="huggingface",
 
 
 
 
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",