Commit
·
660158d
1
Parent(s):
7be4dea
visualizations update
Browse files- gradio_tabs.py +1 -1
- text_visualization.py +6 -6
gradio_tabs.py
CHANGED
|
@@ -87,7 +87,7 @@ def setup_repository_representations_tab(repos_df, repos, representation_types):
|
|
| 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 |
)
|
|
|
|
| 87 |
)
|
| 88 |
tasks_display = tasks if tasks is not None else "No tasks available"
|
| 89 |
return (
|
| 90 |
+
"## Repository PapersWithCode tasks:\n" + " ".join(tasks_display),
|
| 91 |
f"### Representation 1: {representation1}\n\n{text1_content}",
|
| 92 |
f"### Representation 2: {representation2}\n\n{text2_content}",
|
| 93 |
)
|
text_visualization.py
CHANGED
|
@@ -84,21 +84,21 @@ class EmbeddingVisualizer(BaseModel):
|
|
| 84 |
|
| 85 |
display_df = display_df.sort_values("representation", ascending=False)
|
| 86 |
readme_df = display_df[
|
| 87 |
-
display_df["representation"].
|
| 88 |
-
|
| 89 |
)
|
| 90 |
]
|
| 91 |
raw_df = display_df[
|
| 92 |
display_df["representation"].isin(
|
| 93 |
-
["
|
| 94 |
)
|
| 95 |
]
|
| 96 |
dependency_df = display_df[
|
| 97 |
display_df["representation"].isin(
|
| 98 |
[
|
| 99 |
-
"
|
| 100 |
-
"
|
| 101 |
-
"
|
| 102 |
"task",
|
| 103 |
]
|
| 104 |
)
|
|
|
|
| 84 |
|
| 85 |
display_df = display_df.sort_values("representation", ascending=False)
|
| 86 |
readme_df = display_df[
|
| 87 |
+
display_df["representation"].apply(
|
| 88 |
+
lambda r: "readme" in r.lower() or r == "task"
|
| 89 |
)
|
| 90 |
]
|
| 91 |
raw_df = display_df[
|
| 92 |
display_df["representation"].isin(
|
| 93 |
+
["dependency signature", "selected code", "task"]
|
| 94 |
)
|
| 95 |
]
|
| 96 |
dependency_df = display_df[
|
| 97 |
display_df["representation"].isin(
|
| 98 |
[
|
| 99 |
+
"repository signature",
|
| 100 |
+
"dependency signature",
|
| 101 |
+
"generated tasks",
|
| 102 |
"task",
|
| 103 |
]
|
| 104 |
)
|