Commit
·
ea60d34
1
Parent(s):
de9e814
feat: Load repository representations from configured path
Browse files
app.py
CHANGED
@@ -95,7 +95,7 @@ def setup_repository_representations_tab(repos, representation_types):
|
|
95 |
|
96 |
|
97 |
## main
|
98 |
-
repos_df = load_repo_df()
|
99 |
repos = list(repos_df["repo_name"].unique())
|
100 |
representation_types = list(repos_df["representation"].unique())
|
101 |
logging.info(f"found {len(repos)} repositories")
|
@@ -112,9 +112,11 @@ with gr.Blocks() as demo:
|
|
112 |
with gr.Tab("Explore PapersWithCode Tasks"):
|
113 |
gr.Markdown("## PapersWithCode Tasks Visualization")
|
114 |
with gr.Row():
|
115 |
-
min_task_count = gr.Slider(
|
|
|
|
|
116 |
update_button = gr.Button("Update Plots")
|
117 |
-
|
118 |
with gr.Row():
|
119 |
with gr.Column():
|
120 |
gr.Markdown("### All Repositories")
|
@@ -122,15 +124,11 @@ with gr.Blocks() as demo:
|
|
122 |
with gr.Column():
|
123 |
gr.Markdown("### Selected Repositories")
|
124 |
selected_repos_plot = gr.Plot()
|
125 |
-
|
126 |
-
def update_plots(min_count):
|
127 |
-
all_plot, selected_plot = task_visualizations.display_tasks_sunburst_charts(min_count)
|
128 |
-
return all_plot, selected_plot
|
129 |
-
|
130 |
update_button.click(
|
131 |
-
fn=
|
132 |
inputs=[min_task_count],
|
133 |
-
outputs=[all_repos_plot, selected_repos_plot]
|
134 |
)
|
135 |
|
136 |
demo.launch()
|
|
|
95 |
|
96 |
|
97 |
## main
|
98 |
+
repos_df = load_repo_df(AppConfig.repo_representations_path)
|
99 |
repos = list(repos_df["repo_name"].unique())
|
100 |
representation_types = list(repos_df["representation"].unique())
|
101 |
logging.info(f"found {len(repos)} repositories")
|
|
|
112 |
with gr.Tab("Explore PapersWithCode Tasks"):
|
113 |
gr.Markdown("## PapersWithCode Tasks Visualization")
|
114 |
with gr.Row():
|
115 |
+
min_task_count = gr.Slider(
|
116 |
+
minimum=1, maximum=100, value=10, step=1, label="Minimum Task Count"
|
117 |
+
)
|
118 |
update_button = gr.Button("Update Plots")
|
119 |
+
|
120 |
with gr.Row():
|
121 |
with gr.Column():
|
122 |
gr.Markdown("### All Repositories")
|
|
|
124 |
with gr.Column():
|
125 |
gr.Markdown("### Selected Repositories")
|
126 |
selected_repos_plot = gr.Plot()
|
127 |
+
|
|
|
|
|
|
|
|
|
128 |
update_button.click(
|
129 |
+
fn=task_visualizations.display_tasks_sunburst_charts,
|
130 |
inputs=[min_task_count],
|
131 |
+
outputs=[all_repos_plot, selected_repos_plot],
|
132 |
)
|
133 |
|
134 |
demo.launch()
|