Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,7 +92,7 @@ if uploaded_file is not None:
|
|
| 92 |
# Display the results
|
| 93 |
st.write('Contents of results/cmp:')
|
| 94 |
st.text(output)
|
| 95 |
-
|
| 96 |
# Display images
|
| 97 |
input_folder = 'results/cropped_faces'
|
| 98 |
result_folder = 'results/restored_faces'
|
|
@@ -107,5 +107,7 @@ if uploaded_file is not None:
|
|
| 107 |
os.remove(input_path)
|
| 108 |
os.remove(output_path)
|
| 109 |
|
|
|
|
|
|
|
| 110 |
except Exception as e:
|
| 111 |
-
st.error(f"An error occurred: {str(e)}")
|
|
|
|
| 92 |
# Display the results
|
| 93 |
st.write('Contents of results/cmp:')
|
| 94 |
st.text(output)
|
| 95 |
+
|
| 96 |
# Display images
|
| 97 |
input_folder = 'results/cropped_faces'
|
| 98 |
result_folder = 'results/restored_faces'
|
|
|
|
| 107 |
os.remove(input_path)
|
| 108 |
os.remove(output_path)
|
| 109 |
|
| 110 |
+
except subprocess.CalledProcessError as e:
|
| 111 |
+
st.error(f"Command failed with error: {e.stderr}")
|
| 112 |
except Exception as e:
|
| 113 |
+
st.error(f"An unexpected error occurred: {str(e)}")
|