Spaces:
Runtime error
Runtime error
Adjust error handling on inference fail
Browse files- sketch2diagram.py +1 -2
sketch2diagram.py
CHANGED
|
@@ -53,8 +53,7 @@ if generate_command:
|
|
| 53 |
output = run_inference(input_file, model_name, args)[0]
|
| 54 |
except Exception as e:
|
| 55 |
st.error(f"Inference failed: {e}")
|
| 56 |
-
st.
|
| 57 |
-
# return # <-- REMOVE THIS LINE!
|
| 58 |
else:
|
| 59 |
pdf_file_path = compile_tikz_to_pdf(output)
|
| 60 |
if output and pdf_file_path:
|
|
|
|
| 53 |
output = run_inference(input_file, model_name, args)[0]
|
| 54 |
except Exception as e:
|
| 55 |
st.error(f"Inference failed: {e}")
|
| 56 |
+
st.stop()
|
|
|
|
| 57 |
else:
|
| 58 |
pdf_file_path = compile_tikz_to_pdf(output)
|
| 59 |
if output and pdf_file_path:
|