Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -884,6 +884,17 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
884 |
log_output += repr(e)
|
885 |
gr.Error(str(e)) # <-- this is the toast
|
886 |
capture_exception(e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
887 |
return create_empty_error_outputs(str(e))
|
888 |
|
889 |
if getattr(worker, "exc", None) is not None:
|
|
|
884 |
log_output += repr(e)
|
885 |
gr.Error(str(e)) # <-- this is the toast
|
886 |
capture_exception(e)
|
887 |
+
|
888 |
+
with open(log_file, "r", encoding="utf-8") as lf:
|
889 |
+
lf.seek(file_pos)
|
890 |
+
new_txt = lf.read()
|
891 |
+
file_pos = lf.tell()
|
892 |
+
log_output += new_txt
|
893 |
+
yield (
|
894 |
+
"".join(log_output),
|
895 |
+
current_preview,
|
896 |
+
gr.update(), # placeholder for download widget
|
897 |
+
)
|
898 |
return create_empty_error_outputs(str(e))
|
899 |
|
900 |
if getattr(worker, "exc", None) is not None:
|