Y Phung Nguyen commited on
Commit
82b317d
·
1 Parent(s): 19ba953

Assign stream_task cpu only

Browse files
Files changed (3) hide show
  1. pipeline.py +1 -1
  2. requirements.txt +1 -0
  3. ui.py +13 -13
pipeline.py CHANGED
@@ -242,7 +242,7 @@ def _handle_clinical_answer(session_id: str, answer_text: str):
242
  return {"type": "question", "prompt": prompt}
243
 
244
 
245
- @spaces.GPU(max_duration=120)
246
  def stream_chat(
247
  message: str,
248
  history: list,
 
242
  return {"type": "question", "prompt": prompt}
243
 
244
 
245
+ # @spaces.GPU(max_duration=120)
246
  def stream_chat(
247
  message: str,
248
  history: list,
requirements.txt CHANGED
@@ -12,6 +12,7 @@ sentencepiece>=0.1.99
12
  google-genai
13
  langdetect
14
  gradio
 
15
  # MCP dependencies (required for Gemini MCP)
16
  # Install MCP SDK: pip install mcp
17
  # The MCP package provides Model Context Protocol server and client functionality
 
12
  google-genai
13
  langdetect
14
  gradio
15
+ gradio[mcp]
16
  # MCP dependencies (required for Gemini MCP)
17
  # Install MCP SDK: pip install mcp
18
  # The MCP package provides Model Context Protocol server and client functionality
ui.py CHANGED
@@ -140,24 +140,24 @@ def create_demo():
140
  label="Disable agentic reasoning",
141
  info="Use MedSwin model alone without agentic reasoning, RAG, or web search"
142
  )
143
- show_agentic_thought = gr.Button(
144
- "Show agentic thought",
145
- size="sm"
146
- )
147
  enable_clinical_intake = gr.Checkbox(
148
  value=True,
149
  label="Enable clinical intake (max 5 Q&A)",
150
  info="Ask focused follow-up questions before breaking down the case"
151
  )
152
- agentic_thoughts_box = gr.Textbox(
153
- label="Agentic Thoughts",
154
- placeholder="Internal thoughts from MedSwin and supervisor will appear here...",
155
- lines=8,
156
- max_lines=15,
157
- interactive=False,
158
- visible=False,
159
- elem_classes="agentic-thoughts"
160
- )
161
  with gr.Row():
162
  use_rag = gr.Checkbox(
163
  value=False,
 
140
  label="Disable agentic reasoning",
141
  info="Use MedSwin model alone without agentic reasoning, RAG, or web search"
142
  )
143
+ # show_agentic_thought = gr.Button(
144
+ # "Show agentic thought",
145
+ # size="sm"
146
+ # )
147
  enable_clinical_intake = gr.Checkbox(
148
  value=True,
149
  label="Enable clinical intake (max 5 Q&A)",
150
  info="Ask focused follow-up questions before breaking down the case"
151
  )
152
+ # agentic_thoughts_box = gr.Textbox(
153
+ # label="Agentic Thoughts",
154
+ # placeholder="Internal thoughts from MedSwin and supervisor will appear here...",
155
+ # lines=8,
156
+ # max_lines=15,
157
+ # interactive=False,
158
+ # visible=False,
159
+ # elem_classes="agentic-thoughts"
160
+ # )
161
  with gr.Row():
162
  use_rag = gr.Checkbox(
163
  value=False,