victorisgeek commited on
Commit
a04916e
·
verified ·
1 Parent(s): 6e7bef2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -1,4 +1,9 @@
1
- pip install gradio
 
 
 
 
 
2
  import gradio as gr
3
 
4
  # Define your face swapping function here
@@ -14,6 +19,6 @@ iface = gr.Interface(fn=swap_faces,
14
  description="Upload an image to swap faces.")
15
 
16
  # Launch Gradio interface
17
- iface.launch()
18
-
19
- python app.py
 
1
+ import subprocess
2
+
3
+ # Install Gradio
4
+ subprocess.run(["pip", "install", "gradio"])
5
+
6
+ # Import Gradio
7
  import gradio as gr
8
 
9
  # Define your face swapping function here
 
19
  description="Upload an image to swap faces.")
20
 
21
  # Launch Gradio interface
22
+ if __name__ == "__main__":
23
+ iface.launch()
24
+