Ashrafb commited on
Commit
d7b473c
·
1 Parent(s): f0ccc44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
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