Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import gfpgan
|
|
| 6 |
import tempfile
|
| 7 |
import time
|
| 8 |
import gradio as gr
|
| 9 |
-
|
| 10 |
|
| 11 |
class Predictor:
|
| 12 |
def __init__(self):
|
|
@@ -73,10 +73,10 @@ title = "Swap Faces Using Our Model!!!"
|
|
| 73 |
iface = gr.Interface(
|
| 74 |
fn=predictor.predict,
|
| 75 |
inputs=[
|
| 76 |
-
|
| 77 |
-
|
| 78 |
],
|
| 79 |
-
outputs=
|
| 80 |
title=title,
|
| 81 |
examples=[["input.jpg", "swap img.jpg"]])
|
| 82 |
|
|
|
|
| 6 |
import tempfile
|
| 7 |
import time
|
| 8 |
import gradio as gr
|
| 9 |
+
import gradio.inputs as gr_inputs
|
| 10 |
|
| 11 |
class Predictor:
|
| 12 |
def __init__(self):
|
|
|
|
| 73 |
iface = gr.Interface(
|
| 74 |
fn=predictor.predict,
|
| 75 |
inputs=[
|
| 76 |
+
gr_inputs.Image(type="file", label="Target Image"),
|
| 77 |
+
gr_inputs.Image(type="file", label="Swap Image")
|
| 78 |
],
|
| 79 |
+
outputs=gr_outputs.Image(type="file", label="Result"),
|
| 80 |
title=title,
|
| 81 |
examples=[["input.jpg", "swap img.jpg"]])
|
| 82 |
|