Doubleupai commited on
Commit
f3dcd8f
·
verified ·
1 Parent(s): d2eabd0

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def chatbot_response(message, image=None, video=None):
4
+ # Placeholder for the chatbot logic
5
+ response = f"You said: {message}"
6
+ if image:
7
+ response += " | Image received."
8
+ if video:
9
+ response += " | Video received."
10
+ return response
11
+
12
+ iface = gr.Interface(
13
+ fn=chatbot_response,
14
+ inputs=[
15
+ gr.inputs.Textbox(label="Your Message"),
16
+ gr.inputs.Image(label="Upload an Image", optional=True),
17
+ gr.inputs.Video(label="Upload a Video", optional=True)
18
+ ],
19
+ outputs="text",
20
+ title="Mistral Chat",
21
+ description="This is a chatbot. You can send messages and more. Upload an image or video and write what you want and send it and the chatbot Mistral will answer everything."
22
+ )
23
+
24
+ iface.launch()