dylanebert
commited on
Commit
·
a544d54
1
Parent(s):
f219f0a
examples
Browse files
app.py
CHANGED
@@ -1194,14 +1194,6 @@ with gr.Blocks(title="Research Tracker MCP Server") as demo:
|
|
1194 |
)
|
1195 |
submit_btn = gr.Button("🔍 Demonstrate find_research_relationships", variant="primary")
|
1196 |
|
1197 |
-
gr.Markdown("### Example Inputs:")
|
1198 |
-
gr.Markdown("""
|
1199 |
-
- `https://arxiv.org/abs/2506.18787` (3D Arena paper)
|
1200 |
-
- `https://huggingface.co/papers/2010.11929` (Vision Transformer)
|
1201 |
-
- `https://github.com/facebookresearch/segment-anything` (SAM repository)
|
1202 |
-
- `Attention Is All You Need` (paper title)
|
1203 |
-
""")
|
1204 |
-
|
1205 |
gr.Markdown("## Research Relationships")
|
1206 |
|
1207 |
with gr.Row():
|
@@ -1221,7 +1213,7 @@ with gr.Blocks(title="Research Tracker MCP Server") as demo:
|
|
1221 |
license_output = gr.Textbox(label="License", interactive=False)
|
1222 |
field_type_output = gr.Textbox(label="Field Type", interactive=False)
|
1223 |
|
1224 |
-
# Connect the interface
|
1225 |
submit_btn.click(
|
1226 |
fn=process_research_relationships,
|
1227 |
inputs=[input_text],
|
@@ -1232,6 +1224,25 @@ with gr.Blocks(title="Research Tracker MCP Server") as demo:
|
|
1232 |
]
|
1233 |
)
|
1234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1235 |
# Also trigger on Enter key
|
1236 |
input_text.submit(
|
1237 |
fn=process_research_relationships,
|
|
|
1194 |
)
|
1195 |
submit_btn = gr.Button("🔍 Demonstrate find_research_relationships", variant="primary")
|
1196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1197 |
gr.Markdown("## Research Relationships")
|
1198 |
|
1199 |
with gr.Row():
|
|
|
1213 |
license_output = gr.Textbox(label="License", interactive=False)
|
1214 |
field_type_output = gr.Textbox(label="Field Type", interactive=False)
|
1215 |
|
1216 |
+
# Connect the interface with examples
|
1217 |
submit_btn.click(
|
1218 |
fn=process_research_relationships,
|
1219 |
inputs=[input_text],
|
|
|
1224 |
]
|
1225 |
)
|
1226 |
|
1227 |
+
# Add examples using Gradio's built-in system
|
1228 |
+
gr.Examples(
|
1229 |
+
examples=[
|
1230 |
+
["https://arxiv.org/abs/2506.18787"],
|
1231 |
+
["https://huggingface.co/papers/2010.11929"],
|
1232 |
+
["https://github.com/facebookresearch/segment-anything"],
|
1233 |
+
["Attention Is All You Need"]
|
1234 |
+
],
|
1235 |
+
inputs=[input_text],
|
1236 |
+
outputs=[
|
1237 |
+
paper_output, code_output, name_output, authors_output,
|
1238 |
+
date_output, model_output, dataset_output,
|
1239 |
+
space_output, license_output, field_type_output
|
1240 |
+
],
|
1241 |
+
fn=process_research_relationships,
|
1242 |
+
cache_examples=False,
|
1243 |
+
label="Example Inputs"
|
1244 |
+
)
|
1245 |
+
|
1246 |
# Also trigger on Enter key
|
1247 |
input_text.submit(
|
1248 |
fn=process_research_relationships,
|