Spaces:
Running
Running
Camille
commited on
Commit
•
979b420
1
Parent(s):
0a313a4
Flag auto
Browse files- app.py +6 -4
- gradio_queue.db +0 -0
- gradio_queue.db-journal +0 -0
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import os
|
2 |
os.system("pip install gradio==2.8.0b3")
|
3 |
import torch
|
@@ -16,7 +17,7 @@ def inference(img, ver):
|
|
16 |
padding = 10
|
17 |
x, y = 15, 15 # 180, 412
|
18 |
w, h = title_font.getsize(title_text)
|
19 |
-
if ver == "
|
20 |
out = face2paint(model2, img)
|
21 |
else:
|
22 |
out = face2paint(model1, img)
|
@@ -32,13 +33,14 @@ gr.Interface(
|
|
32 |
[
|
33 |
gr.inputs.Image(type="pil", source="upload"),
|
34 |
gr.inputs.Radio(
|
35 |
-
["
|
36 |
type="value",
|
37 |
-
default="
|
38 |
label="version",
|
39 |
),
|
40 |
],
|
41 |
gr.outputs.Image(type="pil"),
|
42 |
-
allow_flagging="
|
43 |
allow_screenshot=False,
|
|
|
44 |
).launch(enable_queue=True)
|
|
|
1 |
+
# coding: utf-8
|
2 |
import os
|
3 |
os.system("pip install gradio==2.8.0b3")
|
4 |
import torch
|
|
|
17 |
padding = 10
|
18 |
x, y = 15, 15 # 180, 412
|
19 |
w, h = title_font.getsize(title_text)
|
20 |
+
if ver == "Version 2 (🔺 Réaliste,🔻 Stylé)":
|
21 |
out = face2paint(model2, img)
|
22 |
else:
|
23 |
out = face2paint(model1, img)
|
|
|
33 |
[
|
34 |
gr.inputs.Image(type="pil", source="upload"),
|
35 |
gr.inputs.Radio(
|
36 |
+
["Version 1 (🔺 Stylé, 🔻 Réaliste)", "Version 2 (🔺 Réaliste,🔻 Stylé)"],
|
37 |
type="value",
|
38 |
+
default="Version 2 (🔺 Réaliste,🔻 Stylé)",
|
39 |
label="version",
|
40 |
),
|
41 |
],
|
42 |
gr.outputs.Image(type="pil"),
|
43 |
+
allow_flagging="auto",
|
44 |
allow_screenshot=False,
|
45 |
+
flagging_dir="flagged"
|
46 |
).launch(enable_queue=True)
|
gradio_queue.db
CHANGED
Binary files a/gradio_queue.db and b/gradio_queue.db differ
|
|
gradio_queue.db-journal
DELETED
Binary file (512 Bytes)
|
|