Update app.py
Browse files
app.py
CHANGED
|
@@ -82,19 +82,6 @@ with gr.Blocks(css=CUSTOM_CSS) as demo:
|
|
| 82 |
gr.Markdown("## 🔍 Modular‑candidate explorer for 🤗 Transformers")
|
| 83 |
|
| 84 |
with gr.Tabs():
|
| 85 |
-
with gr.Tab("Dependency Graph"):
|
| 86 |
-
with gr.Row():
|
| 87 |
-
repo_in = gr.Text(value=HF_MAIN_REPO, label="Repo / fork URL")
|
| 88 |
-
thresh = gr.Slider(0.50, 0.95, value=0.5, step=0.01, label="Similarity ≥")
|
| 89 |
-
multi_cb = gr.Checkbox(label="Only multimodal models")
|
| 90 |
-
gr.Markdown("**Embedding method:** TBD")
|
| 91 |
-
go_btn = gr.Button("Build graph")
|
| 92 |
-
|
| 93 |
-
graph_html_out = gr.HTML(elem_id="graph_html", show_label=False)
|
| 94 |
-
graph_json_out = gr.File(label="Download graph.json")
|
| 95 |
-
|
| 96 |
-
go_btn.click(lambda repo, thresh, multi: run_graph(repo, thresh, multi, "jaccard"), [repo_in, thresh, multi_cb], [graph_html_out, graph_json_out])
|
| 97 |
-
|
| 98 |
with gr.Tab("Chronological Timeline"):
|
| 99 |
with gr.Row():
|
| 100 |
timeline_repo_in = gr.Text(value=HF_MAIN_REPO, label="Repo / fork URL")
|
|
@@ -114,5 +101,18 @@ with gr.Blocks(css=CUSTOM_CSS) as demo:
|
|
| 114 |
loc_html = gr.HTML(show_label=False)
|
| 115 |
go_loc.click(run_loc, [sim_radio2, multi_cb2], loc_html)
|
| 116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
if __name__ == "__main__":
|
| 118 |
demo.launch(allowed_paths=["static"])
|
|
|
|
| 82 |
gr.Markdown("## 🔍 Modular‑candidate explorer for 🤗 Transformers")
|
| 83 |
|
| 84 |
with gr.Tabs():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
with gr.Tab("Chronological Timeline"):
|
| 86 |
with gr.Row():
|
| 87 |
timeline_repo_in = gr.Text(value=HF_MAIN_REPO, label="Repo / fork URL")
|
|
|
|
| 101 |
loc_html = gr.HTML(show_label=False)
|
| 102 |
go_loc.click(run_loc, [sim_radio2, multi_cb2], loc_html)
|
| 103 |
|
| 104 |
+
with gr.Tab("Dependency Graph"):
|
| 105 |
+
with gr.Row():
|
| 106 |
+
repo_in = gr.Text(value=HF_MAIN_REPO, label="Repo / fork URL")
|
| 107 |
+
thresh = gr.Slider(0.50, 0.95, value=0.5, step=0.01, label="Similarity ≥")
|
| 108 |
+
multi_cb = gr.Checkbox(label="Only multimodal models")
|
| 109 |
+
gr.Markdown("**Embedding method:** TBD")
|
| 110 |
+
go_btn = gr.Button("Build graph")
|
| 111 |
+
|
| 112 |
+
graph_html_out = gr.HTML(elem_id="graph_html", show_label=False)
|
| 113 |
+
graph_json_out = gr.File(label="Download graph.json")
|
| 114 |
+
|
| 115 |
+
go_btn.click(lambda repo, thresh, multi: run_graph(repo, thresh, multi, "jaccard"), [repo_in, thresh, multi_cb], [graph_html_out, graph_json_out])
|
| 116 |
+
|
| 117 |
if __name__ == "__main__":
|
| 118 |
demo.launch(allowed_paths=["static"])
|