Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,19 +78,43 @@ def respond(message, history):
|
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
|
| 84 |
#chatbot = gr.ChatInterface(respond, type = "messages", theme)
|
| 85 |
|
| 86 |
-
with gr.Blocks(theme=
|
| 87 |
-
gr.
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
| 89 |
with gr.Row():
|
| 90 |
text_input = gr.Textbox(label="Ask Scooby a question about your pet")
|
| 91 |
image_input = gr.Image(type="pil", label="Upload an image of your pet (optional)")
|
| 92 |
-
gr.Image(value="logo.jpg", width=200, show_label=False, show_share_button = False, show_download_button = False, container=False)
|
| 93 |
-
|
| 94 |
output = gr.Textbox(label="Scooby's Answer")
|
| 95 |
|
| 96 |
submit_btn = gr.Button("Ask Scooby")
|
|
|
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
+
theme = gr.themes.Origin(primary_hue="orange",secondary_hue="indigo", neutral_hue="teal").set(
|
| 82 |
+
background_fill_primary='*primary_200',
|
| 83 |
+
background_fill_primary_dark='*primary_200',
|
| 84 |
+
background_fill_secondary='*secondary_300',
|
| 85 |
+
background_fill_secondary_dark='*secondary_300',
|
| 86 |
+
border_color_accent='*secondary_200',
|
| 87 |
+
border_color_accent_dark='*secondary_600',
|
| 88 |
+
border_color_accent_subdued='*secondary_200',
|
| 89 |
+
border_color_primary='*secondary_300',
|
| 90 |
+
block_border_color='*secondary_200',
|
| 91 |
+
button_primary_background_fill='*secondary_300',
|
| 92 |
+
button_primary_background_fill_dark='*secondary_300'
|
| 93 |
+
)
|
| 94 |
+
welcome_message = """
|
| 95 |
+
# Welcome to ScoobyAI
|
| 96 |
+
## We understand that it is difficult to take care of pets, especially after a long day of school or work. Thats why we created Scooby, you chatbot assistant for all pet health needs!
|
| 97 |
+
"""
|
| 98 |
+
|
| 99 |
+
topics = """
|
| 100 |
+
### Scooby is happy to help you over these topics!
|
| 101 |
+
- Explaining pet issues
|
| 102 |
+
- Creating feeding schedules
|
| 103 |
+
- Creatin recipes for pets based on dietary needs
|
| 104 |
+
"""
|
| 105 |
|
| 106 |
|
| 107 |
#chatbot = gr.ChatInterface(respond, type = "messages", theme)
|
| 108 |
|
| 109 |
+
with gr.Blocks(theme=theme) as demo:
|
| 110 |
+
gr.Image(value="logo.jpg", width=200, show_label=False, show_share_button = False, show_download_button = False, container=False
|
| 111 |
+
gr.Markdown(welcome_message)
|
| 112 |
+
with gr.Row():
|
| 113 |
+
with gr.Column():
|
| 114 |
+
gr.Markdown(topics)
|
| 115 |
with gr.Row():
|
| 116 |
text_input = gr.Textbox(label="Ask Scooby a question about your pet")
|
| 117 |
image_input = gr.Image(type="pil", label="Upload an image of your pet (optional)")
|
|
|
|
|
|
|
| 118 |
output = gr.Textbox(label="Scooby's Answer")
|
| 119 |
|
| 120 |
submit_btn = gr.Button("Ask Scooby")
|