Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,14 @@ import onnxruntime as ort
|
|
| 18 |
import cv2
|
| 19 |
from roop.face_analyser import get_one_face
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
@spaces.GPU()
|
| 22 |
def swap_face(source_file, target_file, doFaceEnhancer):
|
| 23 |
session_id = str(uuid.uuid4()) # Tạo một UUID duy nhất cho mỗi phiên làm việc
|
|
@@ -84,6 +92,7 @@ app = gr.Interface(
|
|
| 84 |
gr.Checkbox(label="Face Enhancer?", info="Do face enhancement?", value=True)
|
| 85 |
],
|
| 86 |
outputs="image",
|
|
|
|
| 87 |
theme="prithivMLmods/Minecraft-Theme"
|
| 88 |
)
|
| 89 |
app.launch()
|
|
|
|
| 18 |
import cv2
|
| 19 |
from roop.face_analyser import get_one_face
|
| 20 |
|
| 21 |
+
css = '''
|
| 22 |
+
.gradio-container{max-width: 780px !important}
|
| 23 |
+
h1{text-align:center}
|
| 24 |
+
footer {
|
| 25 |
+
visibility: hidden
|
| 26 |
+
}
|
| 27 |
+
'''
|
| 28 |
+
|
| 29 |
@spaces.GPU()
|
| 30 |
def swap_face(source_file, target_file, doFaceEnhancer):
|
| 31 |
session_id = str(uuid.uuid4()) # Tạo một UUID duy nhất cho mỗi phiên làm việc
|
|
|
|
| 92 |
gr.Checkbox(label="Face Enhancer?", info="Do face enhancement?", value=True)
|
| 93 |
],
|
| 94 |
outputs="image",
|
| 95 |
+
css=css,
|
| 96 |
theme="prithivMLmods/Minecraft-Theme"
|
| 97 |
)
|
| 98 |
app.launch()
|