Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
import insightface
|
| 3 |
from insightface.app import FaceAnalysis
|
| 4 |
import gradio as gr
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
def Swap_Face(image1,image2):
|
|
@@ -25,6 +26,10 @@ def Swap_Face(image1,image2):
|
|
| 25 |
|
| 26 |
|
| 27 |
title = "Swap Faces Using Our Model!!!"
|
| 28 |
-
iface = gr.Interface(fn=Swap_Face,inputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
iface.launch(share=True)
|
|
|
|
| 2 |
import insightface
|
| 3 |
from insightface.app import FaceAnalysis
|
| 4 |
import gradio as gr
|
| 5 |
+
import gfpgan
|
| 6 |
|
| 7 |
|
| 8 |
def Swap_Face(image1,image2):
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
title = "Swap Faces Using Our Model!!!"
|
| 29 |
+
iface = gr.Interface(fn=Swap_Face,inputs=[
|
| 30 |
+
gr.inputs.Image(type="file", label="Target Image"),
|
| 31 |
+
gr.inputs.Image(type="file", label="Swap Image")
|
| 32 |
+
],
|
| 33 |
+
outputs=gr.outputs.Image(type="file", label="Result"),title=title)
|
| 34 |
|
| 35 |
iface.launch(share=True)
|