Spaces:
Running
Running
Commit
·
e4a1129
1
Parent(s):
998d05d
fix: correct UI layout ordering - title at top
Browse files- src/app.py +24 -7
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 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|