Spaces:
Sleeping
Sleeping
fix: got_ocr
Browse files
app.py
CHANGED
@@ -92,9 +92,12 @@ def perform_ocr(selected_index, image_gallery, got_mode, fine_grained_type, colo
|
|
92 |
)
|
93 |
|
94 |
if html_content:
|
95 |
-
|
|
|
|
|
|
|
96 |
else:
|
97 |
-
return result
|
98 |
|
99 |
|
100 |
def task_update(task):
|
|
|
92 |
)
|
93 |
|
94 |
if html_content:
|
95 |
+
iframe_src = f"data:text/html;base64,{html_content}"
|
96 |
+
iframe = f'<iframe src="{iframe_src}" width="100%" height="600px"></iframe>'
|
97 |
+
download_link = f'<a href="data:text/html;base64,{html_content}" download="result.html">下载完整结果</a>'
|
98 |
+
return gr.Markdown(f"{download_link}\n\n{iframe}")
|
99 |
else:
|
100 |
+
return gr.Markdown(result)
|
101 |
|
102 |
|
103 |
def task_update(task):
|