Spaces:
Sleeping
Sleeping
Add in example title, topics, and disclaimer
Browse files
app.py
CHANGED
|
@@ -36,6 +36,27 @@ def respond(message, history):
|
|
| 36 |
response += token # Add it to the response
|
| 37 |
yield response # yield the response
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
chatbot.launch(debug=True)
|
|
|
|
| 36 |
response += token # Add it to the response
|
| 37 |
yield response # yield the response
|
| 38 |
|
| 39 |
+
# Create the Gradio chat interface (using Gradio's ChatInterface)
|
| 40 |
+
title = "#🧑🍳 SousChef AI"
|
| 41 |
+
topics = """
|
| 42 |
+
### I'm SousChef AI, and I'm here to help you level up in the kitchen:
|
| 43 |
+
Feel free to ask me anything from the topics below!
|
| 44 |
+
- Bullet point 1
|
| 45 |
+
- Bullet point 2
|
| 46 |
+
"""
|
| 47 |
+
disclaimer = "SousChef AI is only designed to provide recommendations on how to prepare and cook different recipes. It is not responsible for any kitchen disasters or bad-tasting meals, that's all you chef!"
|
| 48 |
+
|
| 49 |
+
with gr.Blocks() as chatbot:
|
| 50 |
+
with gr.Row():
|
| 51 |
+
with gr.Column(scale=1):
|
| 52 |
+
gr.Markdown(title)
|
| 53 |
+
gr.Markdown(topics)
|
| 54 |
+
|
| 55 |
+
with gr.Column(scale=2):
|
| 56 |
+
gr.ChatInterface(respond,
|
| 57 |
+
type="messages",
|
| 58 |
+
theme='d8ahazard/material_design_rd')
|
| 59 |
+
with gr.Row():
|
| 60 |
+
gr.Markdown(disclaimer)
|
| 61 |
|
| 62 |
chatbot.launch(debug=True)
|