Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
# -* coding:UTF-8 -*
|
| 2 |
# !/usr/bin/env python
|
|
|
|
| 3 |
import numpy as np
|
| 4 |
import gradio as gr
|
| 5 |
import roop.globals
|
|
@@ -14,6 +15,7 @@ from roop.utilities import normalize_output_path
|
|
| 14 |
import os
|
| 15 |
from PIL import Image
|
| 16 |
|
|
|
|
| 17 |
def swap_face(source_file, target_file,doFaceEnhancer):
|
| 18 |
|
| 19 |
source_path = "input.jpg"
|
|
@@ -66,6 +68,6 @@ def swap_face(source_file, target_file,doFaceEnhancer):
|
|
| 66 |
|
| 67 |
|
| 68 |
app = gr.Interface(
|
| 69 |
-
fn=swap_face, inputs=[gr.Image(), gr.Image(),gr.Checkbox(label="face_enhancer?", info="do face enhancer?")], outputs="image", theme="
|
| 70 |
)
|
| 71 |
app.launch()
|
|
|
|
| 1 |
# -* coding:UTF-8 -*
|
| 2 |
# !/usr/bin/env python
|
| 3 |
+
import spaces
|
| 4 |
import numpy as np
|
| 5 |
import gradio as gr
|
| 6 |
import roop.globals
|
|
|
|
| 15 |
import os
|
| 16 |
from PIL import Image
|
| 17 |
|
| 18 |
+
@spaces.GPU()
|
| 19 |
def swap_face(source_file, target_file,doFaceEnhancer):
|
| 20 |
|
| 21 |
source_path = "input.jpg"
|
|
|
|
| 68 |
|
| 69 |
|
| 70 |
app = gr.Interface(
|
| 71 |
+
fn=swap_face, inputs=[gr.Image(), gr.Image(),gr.Checkbox(label="face_enhancer?", info="do face enhancer?", value=True)], outputs="image", theme="prithivMLmods/Minecraft-Theme"
|
| 72 |
)
|
| 73 |
app.launch()
|