Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,10 @@ from roop.utilities import normalize_output_path
|
|
13 |
from PIL import Image
|
14 |
import gradio as gr
|
15 |
import os
|
|
|
16 |
|
|
|
|
|
17 |
def swap_face(source_file, target_file):
|
18 |
source_image = Image.fromarray(source_file)
|
19 |
source_path = "input.jpg"
|
@@ -55,4 +58,4 @@ app = gr.Interface(
|
|
55 |
fn=swap_face, inputs=[gr.Image(), gr.Video()], outputs=[gr.Video()], description="Deep Fake",theme="bethecloud/storj_theme"
|
56 |
)
|
57 |
|
58 |
-
app.launch()
|
|
|
13 |
from PIL import Image
|
14 |
import gradio as gr
|
15 |
import os
|
16 |
+
import spaces
|
17 |
|
18 |
+
|
19 |
+
@spaces.GPU(enable_queue=True)
|
20 |
def swap_face(source_file, target_file):
|
21 |
source_image = Image.fromarray(source_file)
|
22 |
source_path = "input.jpg"
|
|
|
58 |
fn=swap_face, inputs=[gr.Image(), gr.Video()], outputs=[gr.Video()], description="Deep Fake",theme="bethecloud/storj_theme"
|
59 |
)
|
60 |
|
61 |
+
app.launch(max_size=40)
|