Spaces:
Sleeping
Sleeping
Commit
·
b4d37bd
1
Parent(s):
47608d0
Update app.py
Browse files
app.py
CHANGED
|
@@ -154,15 +154,22 @@ libraries = [library for library in df.library.unique() if library]
|
|
| 154 |
metadata_coverage_columns = [c for c in df.columns if c.startswith("has")]
|
| 155 |
with gr.Blocks() as demo:
|
| 156 |
gr.Markdown("# 🤗 Hub Metadata Explorer")
|
| 157 |
-
gr.Markdown(
|
| 158 |
-
|
| 159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
with gr.Row():
|
| 161 |
-
gr.Markdown(
|
|
|
|
|
|
|
|
|
|
| 162 |
with gr.Row():
|
| 163 |
case_sensitive = gr.Checkbox(
|
| 164 |
True,
|
| 165 |
-
label="
|
| 166 |
)
|
| 167 |
mk = gr.Markdown()
|
| 168 |
case_sensitive.change(get_number_of_tags, [case_sensitive], mk, queue=False)
|
|
@@ -171,7 +178,11 @@ with gr.Blocks() as demo:
|
|
| 171 |
case_sensitive.change(tag_frequency, [case_sensitive], df, queue=False)
|
| 172 |
with gr.Row():
|
| 173 |
gr.Markdown(
|
| 174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
)
|
| 176 |
with gr.Row():
|
| 177 |
with gr.Accordion("View case sensitive tag pairs", open=False):
|
|
@@ -211,4 +222,4 @@ with gr.Blocks() as demo:
|
|
| 211 |
model_card_length_by_library, [min_lib_frequency], df, queue=False
|
| 212 |
)
|
| 213 |
|
| 214 |
-
demo.launch(
|
|
|
|
| 154 |
metadata_coverage_columns = [c for c in df.columns if c.startswith("has")]
|
| 155 |
with gr.Blocks() as demo:
|
| 156 |
gr.Markdown("# 🤗 Hub Metadata Explorer")
|
| 157 |
+
gr.Markdown(
|
| 158 |
+
"tl;dr: this dashboard aims to provide an overview of model metadata on the hub"
|
| 159 |
+
)
|
| 160 |
+
with gr.Tab("Tag frequencies"):
|
| 161 |
+
gr.Markdown(
|
| 162 |
+
"Tags are one of the key ways in which users may identify models which are of interest."
|
| 163 |
+
)
|
| 164 |
with gr.Row():
|
| 165 |
+
gr.Markdown(
|
| 166 |
+
"The accordian below allows you to see the top tags for models on the hub (optionally making "
|
| 167 |
+
"tags case insensitive"
|
| 168 |
+
)
|
| 169 |
with gr.Row():
|
| 170 |
case_sensitive = gr.Checkbox(
|
| 171 |
True,
|
| 172 |
+
label="case sensitive",
|
| 173 |
)
|
| 174 |
mk = gr.Markdown()
|
| 175 |
case_sensitive.change(get_number_of_tags, [case_sensitive], mk, queue=False)
|
|
|
|
| 178 |
case_sensitive.change(tag_frequency, [case_sensitive], df, queue=False)
|
| 179 |
with gr.Row():
|
| 180 |
gr.Markdown(
|
| 181 |
+
"Some tags are currently used with in cased or uncased forms i.e. 'translation' vs 'Translation'"
|
| 182 |
+
)
|
| 183 |
+
with gr.Row():
|
| 184 |
+
gr.Markdown(
|
| 185 |
+
f"Number of tags which are currently case sensitive {len(get_case_sensitive_duplicate_tags())}"
|
| 186 |
)
|
| 187 |
with gr.Row():
|
| 188 |
with gr.Accordion("View case sensitive tag pairs", open=False):
|
|
|
|
| 222 |
model_card_length_by_library, [min_lib_frequency], df, queue=False
|
| 223 |
)
|
| 224 |
|
| 225 |
+
demo.launch()
|