Upload 2 files
Browse files
app.py
CHANGED
|
@@ -880,10 +880,11 @@ elif app_mode == 'Test Video Translation':
|
|
| 880 |
|
| 881 |
finally:
|
| 882 |
# Clean up resources
|
| 883 |
-
video_capture
|
| 884 |
-
|
|
|
|
| 885 |
video_writer.close()
|
| 886 |
-
cv2.destroyAllWindows()
|
| 887 |
|
| 888 |
# Footer
|
| 889 |
st.markdown(
|
|
|
|
| 880 |
|
| 881 |
finally:
|
| 882 |
# Clean up resources
|
| 883 |
+
if 'video_capture' in locals() and video_capture is not None:
|
| 884 |
+
video_capture.release()
|
| 885 |
+
if 'video_writer' in locals() and video_writer is not None:
|
| 886 |
video_writer.close()
|
| 887 |
+
# Note: cv2.destroyAllWindows() removed for headless compatibility
|
| 888 |
|
| 889 |
# Footer
|
| 890 |
st.markdown(
|