Dina-Raslan commited on
Commit
1002725
Β·
verified Β·
1 Parent(s): 06f75a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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, type="messages")
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({"role": "user", "content": message})
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])