Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -148,7 +148,9 @@ def vote(data: gr.LikeData):
|
|
| 148 |
print("You upvoted this response: " + data.value["value"])
|
| 149 |
else:
|
| 150 |
print("You downvoted this response: " + data.value["value"])
|
| 151 |
-
|
|
|
|
|
|
|
| 152 |
with gr.Blocks() as demo:
|
| 153 |
chatbot = gr.Chatbot(label="NutriAssist")
|
| 154 |
chatbot.like(vote, None, None)
|
|
@@ -170,11 +172,7 @@ with gr.Blocks() as demo:
|
|
| 170 |
fn=respond,
|
| 171 |
inputs=[msg, checkboxes, history_state],
|
| 172 |
outputs=[chatbot]
|
| 173 |
-
)
|
| 174 |
|
| 175 |
-
title = """# 🐑 NutriAssist 🌱"""
|
| 176 |
-
|
| 177 |
-
with gr.Blocks() as chatbot:
|
| 178 |
with gr.Row(scale=1):
|
| 179 |
gr.Image(
|
| 180 |
value="NutriAssistBanner.png",
|
|
@@ -197,9 +195,7 @@ with gr.Blocks() as chatbot:
|
|
| 197 |
|
| 198 |
with gr.Column(scale=2):
|
| 199 |
gr.ChatInterface(respond, type="messages")
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
chatbot.launch()
|
| 203 |
|
| 204 |
demo.launch()
|
| 205 |
#chatbot = gr.ChatInterface(respond, type="messages")
|
|
|
|
| 148 |
print("You upvoted this response: " + data.value["value"])
|
| 149 |
else:
|
| 150 |
print("You downvoted this response: " + data.value["value"])
|
| 151 |
+
|
| 152 |
+
title = """# 🐑 NutriAssist 🌱"""
|
| 153 |
+
|
| 154 |
with gr.Blocks() as demo:
|
| 155 |
chatbot = gr.Chatbot(label="NutriAssist")
|
| 156 |
chatbot.like(vote, None, None)
|
|
|
|
| 172 |
fn=respond,
|
| 173 |
inputs=[msg, checkboxes, history_state],
|
| 174 |
outputs=[chatbot]
|
|
|
|
| 175 |
|
|
|
|
|
|
|
|
|
|
| 176 |
with gr.Row(scale=1):
|
| 177 |
gr.Image(
|
| 178 |
value="NutriAssistBanner.png",
|
|
|
|
| 195 |
|
| 196 |
with gr.Column(scale=2):
|
| 197 |
gr.ChatInterface(respond, type="messages")
|
| 198 |
+
)
|
|
|
|
|
|
|
| 199 |
|
| 200 |
demo.launch()
|
| 201 |
#chatbot = gr.ChatInterface(respond, type="messages")
|