Spaces:
Running
Running
progress
Browse files
app.py
CHANGED
|
@@ -30,11 +30,15 @@ def embed_figures(html_body, resources):
|
|
| 30 |
html_body = html_body.replace(key, img_tag)
|
| 31 |
return html_body
|
| 32 |
|
| 33 |
-
def parse_notebook(filter_options):
|
| 34 |
reset_tmp_folder()
|
| 35 |
-
|
| 36 |
found_notebook = False
|
|
|
|
|
|
|
| 37 |
while not found_notebook:
|
|
|
|
|
|
|
|
|
|
| 38 |
notebook_data = next(ds_iter)
|
| 39 |
notebook_string = notebook_data["text"]
|
| 40 |
notebook_id = notebook_data["id"].split("/")[-1]
|
|
|
|
| 30 |
html_body = html_body.replace(key, img_tag)
|
| 31 |
return html_body
|
| 32 |
|
| 33 |
+
def parse_notebook(filter_options, progress=gr.Progress()):
|
| 34 |
reset_tmp_folder()
|
|
|
|
| 35 |
found_notebook = False
|
| 36 |
+
|
| 37 |
+
counter = 0
|
| 38 |
while not found_notebook:
|
| 39 |
+
progress((counter, None), desc="Parsing and filtering notebooks...", unit="steps")
|
| 40 |
+
counter += 1
|
| 41 |
+
|
| 42 |
notebook_data = next(ds_iter)
|
| 43 |
notebook_string = notebook_data["text"]
|
| 44 |
notebook_id = notebook_data["id"].split("/")[-1]
|