lambdaofgod commited on
Commit
7be4dea
·
1 Parent(s): 1c73ae0

tabs update

Browse files
Files changed (2) hide show
  1. app.py +4 -6
  2. gradio_tabs.py +2 -1
app.py CHANGED
@@ -87,14 +87,12 @@ descriptions = {
87
  }
88
 
89
  with gr.Blocks() as demo:
 
 
90
  with gr.Tab("Explore Dependency Graphs"):
91
  setup_graph_tab()
92
- with gr.Tab("Explore Repository Embeddings"):
93
- setup_embeddings_tab(descriptions, embedding_visualizer)
94
  with gr.Tab("Explore Repository Representations"):
95
  setup_repository_representations_tab(repos_df, repos, representation_types)
96
- with gr.Tab("Explore PapersWithCode Tasks"):
97
- setup_tasks_tab(descriptions, task_visualizations)
98
-
99
-
100
  demo.launch(share=True)
 
87
  }
88
 
89
  with gr.Blocks() as demo:
90
+ with gr.Tab("Explore PapersWithCode Tasks"):
91
+ setup_tasks_tab(descriptions, task_visualizations)
92
  with gr.Tab("Explore Dependency Graphs"):
93
  setup_graph_tab()
 
 
94
  with gr.Tab("Explore Repository Representations"):
95
  setup_repository_representations_tab(repos_df, repos, representation_types)
96
+ with gr.Tab("Explore Repository Embeddings"):
97
+ setup_embeddings_tab(descriptions, embedding_visualizer)
 
 
98
  demo.launch(share=True)
gradio_tabs.py CHANGED
@@ -85,8 +85,9 @@ def setup_repository_representations_tab(repos_df, repos, representation_types):
85
  tasks, text1_content, text2_content = display_representations(
86
  repos_df, repo, representation1, representation2
87
  )
 
88
  return (
89
- "## Repository PapersWithCode tasks:\n" + ", ".join(tasks),
90
  f"### Representation 1: {representation1}\n\n{text1_content}",
91
  f"### Representation 2: {representation2}\n\n{text2_content}",
92
  )
 
85
  tasks, text1_content, text2_content = display_representations(
86
  repos_df, repo, representation1, representation2
87
  )
88
+ tasks_display = tasks if tasks is not None else "No tasks available"
89
  return (
90
+ "## Repository PapersWithCode tasks:\n" + tasks_display,
91
  f"### Representation 1: {representation1}\n\n{text1_content}",
92
  f"### Representation 2: {representation2}\n\n{text2_content}",
93
  )