Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -105,22 +105,16 @@ with gr.Blocks(theme=theme) as demo:
|
|
| 105 |
with gr.Tabletem("Main Page"):
|
| 106 |
with gr.Row():
|
| 107 |
text_input = gr.Textbox(label="Ask Scooby a question about your pet")
|
| 108 |
-
|
| 109 |
output = gr.Textbox(label="Scooby's Answer")
|
| 110 |
submit_btn = gr.Button("Ask Scooby")
|
| 111 |
-
|
| 112 |
-
gr.ChatInterface(
|
| 113 |
-
fn=respond_recipe,
|
| 114 |
-
title="Pet Recipe Assistant 🍽️",
|
| 115 |
-
textbox=gr.Textbox(placeholder="What does your pet need a recipe for?", label="Recipe Request"),
|
| 116 |
-
chat_history=True,
|
| 117 |
-
retry_btn="🔁 Try Again",
|
| 118 |
-
clear_btn="🧹 Clear Chat"
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
-
|
| 123 |
-
|
| 124 |
|
| 125 |
|
| 126 |
|
|
|
|
| 105 |
with gr.Tabletem("Main Page"):
|
| 106 |
with gr.Row():
|
| 107 |
text_input = gr.Textbox(label="Ask Scooby a question about your pet")
|
| 108 |
+
# image_input = gr.Image(type="pil", label="Upload an image of your pet (optional)")
|
| 109 |
output = gr.Textbox(label="Scooby's Answer")
|
| 110 |
submit_btn = gr.Button("Ask Scooby")
|
| 111 |
+
with gr.Tabletem("🍲 Recipes"):
|
| 112 |
+
gr.ChatInterface(fn=respond_recipe,title="Pet Recipe Assistant 🍽️",textbox=gr.Textbox(placeholder="What does your pet need a recipe for?", label="Recipe Request"),chat_history=True,retry_btn="🔁 Try Again",clear_btn="🧹 Clear Chat")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
+
submit_btn.click(fn=respond, inputs=text_input, outputs=output)
|
| 117 |
+
#inputs=[text_input, image_input can be added once error fixed
|
| 118 |
|
| 119 |
|
| 120 |
|