Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| def chatbot_response(message, image=None, video=None): | |
| # Placeholder for the chatbot logic | |
| response = f"You said: {message}" | |
| if image: | |
| response += " | Image received." | |
| if video: | |
| response += " | Video received." | |
| return response | |
| iface = gr.Interface( | |
| fn=chatbot_response, | |
| inputs=[ | |
| gr.inputs.Textbox(label="Your Message"), | |
| gr.inputs.Image(label="Upload an Image", optional=True), | |
| gr.inputs.Video(label="Upload a Video", optional=True) | |
| ], | |
| outputs="text", | |
| title="Mistral Chat", | |
| 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." | |
| ) | |
| iface.launch() | |