Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -708,7 +708,7 @@ with gr.Blocks(title="CKD-MultiVision") as demo:
|
|
| 708 |
# ββ Tab 2: CKD Health Coach ββββββββββββββββββββββββββββββββββββββββ
|
| 709 |
with gr.TabItem(" CKD Health Coach"):
|
| 710 |
gr.Markdown("### Ask about diet, lifestyle, exercise, and kidney health.")
|
| 711 |
-
chatbot = gr.Chatbot(height=450
|
| 712 |
chat_input = gr.Textbox(placeholder="Ask a question about CKD...", label="Your Message")
|
| 713 |
send_btn = gr.Button("Send", variant="primary")
|
| 714 |
gr.Examples(
|
|
@@ -794,8 +794,7 @@ with gr.Blocks(title="CKD-MultiVision") as demo:
|
|
| 794 |
return history, ""
|
| 795 |
bot_response = chat_with_groq(message, history)
|
| 796 |
history = history or []
|
| 797 |
-
history.append(
|
| 798 |
-
history.append({"role": "assistant", "content": bot_response})
|
| 799 |
return history, ""
|
| 800 |
|
| 801 |
send_btn.click(fn=respond, inputs=[chat_input, chatbot], outputs=[chatbot, chat_input])
|
|
|
|
| 708 |
# ββ Tab 2: CKD Health Coach ββββββββββββββββββββββββββββββββββββββββ
|
| 709 |
with gr.TabItem(" CKD Health Coach"):
|
| 710 |
gr.Markdown("### Ask about diet, lifestyle, exercise, and kidney health.")
|
| 711 |
+
chatbot = gr.Chatbot(height=450
|
| 712 |
chat_input = gr.Textbox(placeholder="Ask a question about CKD...", label="Your Message")
|
| 713 |
send_btn = gr.Button("Send", variant="primary")
|
| 714 |
gr.Examples(
|
|
|
|
| 794 |
return history, ""
|
| 795 |
bot_response = chat_with_groq(message, history)
|
| 796 |
history = history or []
|
| 797 |
+
history.append((message, bot_response))
|
|
|
|
| 798 |
return history, ""
|
| 799 |
|
| 800 |
send_btn.click(fn=respond, inputs=[chat_input, chatbot], outputs=[chatbot, chat_input])
|