VibecoderMcSwaggins commited on
Commit
fea6e64
·
unverified ·
2 Parent(s): 998d05d e760d70

Merge pull request #34 from The-Obstacle-Is-The-Way/dev

Browse files
Files changed (3) hide show
  1. pyproject.toml +1 -1
  2. requirements.txt +1 -1
  3. src/app.py +24 -7
pyproject.toml CHANGED
@@ -17,7 +17,7 @@ dependencies = [
17
  "beautifulsoup4>=4.12", # HTML parsing
18
  "xmltodict>=0.13", # PubMed XML -> dict
19
  # UI
20
- "gradio[mcp]>=5.32.0", # Chat interface with MCP server support
21
  # Utils
22
  "python-dotenv>=1.0", # .env loading
23
  "tenacity>=8.2", # Retry logic
 
17
  "beautifulsoup4>=4.12", # HTML parsing
18
  "xmltodict>=0.13", # PubMed XML -> dict
19
  # UI
20
+ "gradio[mcp]>=6.0.0", # Chat interface with MCP server support (6.0 required for css in launch())
21
  # Utils
22
  "python-dotenv>=1.0", # .env loading
23
  "tenacity>=8.2", # Retry logic
requirements.txt CHANGED
@@ -13,7 +13,7 @@ beautifulsoup4>=4.12
13
  xmltodict>=0.13
14
 
15
  # UI (Gradio with MCP server support)
16
- gradio[mcp]>=5.32.0
17
 
18
  # Utils
19
  python-dotenv>=1.0
 
13
  xmltodict>=0.13
14
 
15
  # UI (Gradio with MCP server support)
16
+ gradio[mcp]>=6.0.0
17
 
18
  # Utils
19
  python-dotenv>=1.0
src/app.py CHANGED
@@ -185,15 +185,23 @@ def create_demo() -> Any:
185
  title="DeepCritical - Drug Repurposing Research Agent",
186
  fill_height=True,
187
  ) as demo:
188
- # Main chat interface - title/description inside ChatInterface for proper layout
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  gr.ChatInterface(
190
  fn=research_agent,
191
- title="🧬 DeepCritical",
192
- description=(
193
- "**AI-Powered Drug Repurposing Research Agent**\n\n"
194
- "Ask questions about potential drug repurposing opportunities. "
195
- "The agent searches PubMed, ClinicalTrials.gov, and bioRxiv/medRxiv preprints."
196
- ),
197
  examples=[
198
  [
199
  "What drugs could be repurposed for Alzheimer's disease?",
@@ -320,12 +328,21 @@ def create_demo() -> Any:
320
 
321
  def main() -> None:
322
  """Run the Gradio app with MCP server enabled."""
 
 
 
 
 
 
 
 
323
  demo = create_demo()
324
  demo.launch(
325
  server_name="0.0.0.0",
326
  server_port=7860,
327
  share=False,
328
  mcp_server=True,
 
329
  )
330
 
331
 
 
185
  title="DeepCritical - Drug Repurposing Research Agent",
186
  fill_height=True,
187
  ) as demo:
188
+ # 1. Title & Description (Top of page)
189
+ gr.Markdown("""
190
+ # 🧬 DeepCritical
191
+ ## AI-Powered Drug Repurposing Research Agent
192
+
193
+ Ask questions about potential drug repurposing opportunities.
194
+ The agent searches PubMed, ClinicalTrials.gov, and bioRxiv/medRxiv preprints.
195
+
196
+ **Example questions:**
197
+ - "What drugs could be repurposed for Alzheimer's disease?"
198
+ - "Is metformin effective for cancer treatment?"
199
+ - "What existing medications show promise for Long COVID?"
200
+ """)
201
+
202
+ # 2. Main chat interface
203
  gr.ChatInterface(
204
  fn=research_agent,
 
 
 
 
 
 
205
  examples=[
206
  [
207
  "What drugs could be repurposed for Alzheimer's disease?",
 
328
 
329
  def main() -> None:
330
  """Run the Gradio app with MCP server enabled."""
331
+ # CSS to fix the header cutoff issue in HuggingFace Spaces
332
+ # Adds padding to the top of the container to clear the HF banner
333
+ css = """
334
+ .gradio-container {
335
+ padding-top: 50px !important;
336
+ }
337
+ """
338
+
339
  demo = create_demo()
340
  demo.launch(
341
  server_name="0.0.0.0",
342
  server_port=7860,
343
  share=False,
344
  mcp_server=True,
345
+ css=css,
346
  )
347
 
348