Update app.py
Browse files
app.py
CHANGED
@@ -34,9 +34,7 @@ source_file = st.file_uploader("Upload source image")
|
|
34 |
target_file = st.file_uploader("Upload target image/video")
|
35 |
use_face_enhancer = st.checkbox("Use only Face Enhancer", False)
|
36 |
|
37 |
-
if st.button("Swap Faces"):
|
38 |
result = run_scripts(target_file.name, source_file.name, use_face_enhancer)
|
39 |
if result:
|
40 |
st.image(result) # Display the result as an image
|
41 |
-
|
42 |
-
# No need to remove uploaded files, as they are now passed as strings.
|
|
|
34 |
target_file = st.file_uploader("Upload target image/video")
|
35 |
use_face_enhancer = st.checkbox("Use only Face Enhancer", False)
|
36 |
|
37 |
+
if source_file and target_file and st.button("Swap Faces"):
|
38 |
result = run_scripts(target_file.name, source_file.name, use_face_enhancer)
|
39 |
if result:
|
40 |
st.image(result) # Display the result as an image
|
|
|
|