Spaces:
Running
Running
Commit
·
521d97d
1
Parent(s):
7cc8b69
fix: wire analyze_hypothesis MCP tool into Gradio app
Browse filesSenior review found that analyze_hypothesis existed in mcp_tools.py
but wasn't exposed through the Gradio MCP interface. Fixed.
- src/app.py +17 -0
src/app.py
CHANGED
|
@@ -8,6 +8,7 @@ import gradio as gr
|
|
| 8 |
|
| 9 |
from src.agent_factory.judges import JudgeHandler, MockJudgeHandler
|
| 10 |
from src.mcp_tools import (
|
|
|
|
| 11 |
search_all_sources,
|
| 12 |
search_biorxiv,
|
| 13 |
search_clinical_trials,
|
|
@@ -211,6 +212,22 @@ def create_demo() -> Any:
|
|
| 211 |
api_name="search_all",
|
| 212 |
)
|
| 213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
gr.Markdown("""
|
| 215 |
---
|
| 216 |
**Note**: This is a research tool and should not be used for medical decisions.
|
|
|
|
| 8 |
|
| 9 |
from src.agent_factory.judges import JudgeHandler, MockJudgeHandler
|
| 10 |
from src.mcp_tools import (
|
| 11 |
+
analyze_hypothesis,
|
| 12 |
search_all_sources,
|
| 13 |
search_biorxiv,
|
| 14 |
search_clinical_trials,
|
|
|
|
| 212 |
api_name="search_all",
|
| 213 |
)
|
| 214 |
|
| 215 |
+
with gr.Tab("Analyze Hypothesis"):
|
| 216 |
+
gr.Interface(
|
| 217 |
+
fn=analyze_hypothesis,
|
| 218 |
+
inputs=[
|
| 219 |
+
gr.Textbox(label="Drug", placeholder="metformin"),
|
| 220 |
+
gr.Textbox(label="Condition", placeholder="Alzheimer's disease"),
|
| 221 |
+
gr.Textbox(
|
| 222 |
+
label="Evidence Summary",
|
| 223 |
+
placeholder="Studies show metformin reduces tau phosphorylation...",
|
| 224 |
+
lines=5,
|
| 225 |
+
),
|
| 226 |
+
],
|
| 227 |
+
outputs=gr.Markdown(label="Analysis Result"),
|
| 228 |
+
api_name="analyze_hypothesis",
|
| 229 |
+
)
|
| 230 |
+
|
| 231 |
gr.Markdown("""
|
| 232 |
---
|
| 233 |
**Note**: This is a research tool and should not be used for medical decisions.
|