Spaces:
Runtime error
Runtime error
Commit ·
f4c1775
1
Parent(s): cfe7c49
Fixed PDF bug
Browse files- app.py +1 -0
- gradio_scripts/result_ui.py +2 -1
app.py
CHANGED
|
@@ -83,6 +83,7 @@ def on_result_upload(zip_list, aris_list):
|
|
| 83 |
|
| 84 |
reset_state(result, state)
|
| 85 |
state['version'] = WEBAPP_VERSION
|
|
|
|
| 86 |
|
| 87 |
component_updates = {
|
| 88 |
master_tabs: gr.update(selected=1),
|
|
|
|
| 83 |
|
| 84 |
reset_state(result, state)
|
| 85 |
state['version'] = WEBAPP_VERSION
|
| 86 |
+
state['outputs'] = ["Annotated Video", "Manual Marking", "PDF"]
|
| 87 |
|
| 88 |
component_updates = {
|
| 89 |
master_tabs: gr.update(selected=1),
|
gradio_scripts/result_ui.py
CHANGED
|
@@ -41,7 +41,8 @@ def update_result(i, state, result, inference_handler):
|
|
| 41 |
|
| 42 |
annotation_avaliable = not (result["aris_input"][i] == None)
|
| 43 |
|
| 44 |
-
|
|
|
|
| 45 |
|
| 46 |
# Check if files exist
|
| 47 |
video_path = result["path_video"][i]
|
|
|
|
| 41 |
|
| 42 |
annotation_avaliable = not (result["aris_input"][i] == None)
|
| 43 |
|
| 44 |
+
if 'pdf' in state['outputs']:
|
| 45 |
+
make_pdf(state['index']-1, state, result, table_headers)
|
| 46 |
|
| 47 |
# Check if files exist
|
| 48 |
video_path = result["path_video"][i]
|