Spaces:
Sleeping
Sleeping
Remove png image
Browse files
app.py
CHANGED
@@ -184,7 +184,6 @@ def generate_topics(dataset, config, split, column, nested_column, plot_type):
|
|
184 |
gr.Plot(value=None, visible=True),
|
185 |
gr.Label({message: rows_processed / limit}, visible=True),
|
186 |
"",
|
187 |
-
"",
|
188 |
)
|
189 |
while offset < limit:
|
190 |
docs = get_docs_from_parquet(parquet_urls, column, offset, CHUNK_SIZE)
|
@@ -266,7 +265,6 @@ def generate_topics(dataset, config, split, column, nested_column, plot_type):
|
|
266 |
topic_plot,
|
267 |
gr.Label({message: progress}, visible=True),
|
268 |
"",
|
269 |
-
"",
|
270 |
)
|
271 |
|
272 |
offset += CHUNK_SIZE
|
@@ -322,10 +320,6 @@ def generate_topics(dataset, config, split, column, nested_column, plot_type):
|
|
322 |
token=HF_TOKEN,
|
323 |
)
|
324 |
|
325 |
-
plot_png_link = (
|
326 |
-
f"https://huggingface.co/spaces/{space_id}/blob/main/static_plot.png"
|
327 |
-
)
|
328 |
-
|
329 |
space_link = f"https://huggingface.co/spaces/{space_id}"
|
330 |
yield (
|
331 |
gr.Accordion(open=False),
|
@@ -334,7 +328,6 @@ def generate_topics(dataset, config, split, column, nested_column, plot_type):
|
|
334 |
gr.Label(
|
335 |
{f"✅ Done: {rows_processed} rows have been processed": 1.0}, visible=True
|
336 |
),
|
337 |
-
f"[![Download as PNG](https://img.shields.io/badge/Download_as-PNG-red)]({plot_png_link})",
|
338 |
f"[![Go to interactive plot](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Space-blue)]({space_link})",
|
339 |
)
|
340 |
cuda.empty_cache()
|
@@ -384,9 +377,7 @@ with gr.Blocks() as demo:
|
|
384 |
|
385 |
gr.Markdown("## Data map")
|
386 |
full_topics_generation_label = gr.Label(visible=False, show_label=False)
|
387 |
-
|
388 |
-
open_png_label = gr.Markdown()
|
389 |
-
open_space_label = gr.Markdown()
|
390 |
topics_plot = gr.Plot()
|
391 |
with gr.Accordion("Topics Info", open=False):
|
392 |
topics_df = gr.DataFrame(interactive=False, visible=True)
|
@@ -405,7 +396,6 @@ with gr.Blocks() as demo:
|
|
405 |
topics_df,
|
406 |
topics_plot,
|
407 |
full_topics_generation_label,
|
408 |
-
open_png_label,
|
409 |
open_space_label,
|
410 |
],
|
411 |
)
|
|
|
184 |
gr.Plot(value=None, visible=True),
|
185 |
gr.Label({message: rows_processed / limit}, visible=True),
|
186 |
"",
|
|
|
187 |
)
|
188 |
while offset < limit:
|
189 |
docs = get_docs_from_parquet(parquet_urls, column, offset, CHUNK_SIZE)
|
|
|
265 |
topic_plot,
|
266 |
gr.Label({message: progress}, visible=True),
|
267 |
"",
|
|
|
268 |
)
|
269 |
|
270 |
offset += CHUNK_SIZE
|
|
|
320 |
token=HF_TOKEN,
|
321 |
)
|
322 |
|
|
|
|
|
|
|
|
|
323 |
space_link = f"https://huggingface.co/spaces/{space_id}"
|
324 |
yield (
|
325 |
gr.Accordion(open=False),
|
|
|
328 |
gr.Label(
|
329 |
{f"✅ Done: {rows_processed} rows have been processed": 1.0}, visible=True
|
330 |
),
|
|
|
331 |
f"[![Go to interactive plot](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Space-blue)]({space_link})",
|
332 |
)
|
333 |
cuda.empty_cache()
|
|
|
377 |
|
378 |
gr.Markdown("## Data map")
|
379 |
full_topics_generation_label = gr.Label(visible=False, show_label=False)
|
380 |
+
open_space_label = gr.Markdown()
|
|
|
|
|
381 |
topics_plot = gr.Plot()
|
382 |
with gr.Accordion("Topics Info", open=False):
|
383 |
topics_df = gr.DataFrame(interactive=False, visible=True)
|
|
|
396 |
topics_df,
|
397 |
topics_plot,
|
398 |
full_topics_generation_label,
|
|
|
399 |
open_space_label,
|
400 |
],
|
401 |
)
|