Spaces:
Sleeping
Sleeping
Riswan-Nopiyar
commited on
Commit
β’
23a3c1d
1
Parent(s):
b7cad46
perbaikan tampilan
Browse files
app.py
CHANGED
@@ -64,28 +64,24 @@ def swap_face(source_file, target_file, doFaceEnhancer):
|
|
64 |
return output_path
|
65 |
|
66 |
|
67 |
-
html_section_1 = "<div style='text
|
68 |
-
html_section_2 = "<div style='text
|
69 |
|
70 |
app = gr.Blocks()
|
71 |
|
72 |
with app:
|
73 |
gr.HTML(html_section_1)
|
74 |
gr.HTML(html_section_2)
|
75 |
-
with gr.Column():
|
76 |
-
gr.Image(label="Sumber")
|
77 |
-
gr.Image(label="Target")
|
78 |
-
gr.Checkbox(label="Tingkatkan", info="Tingkatkan kualitas wajah?")
|
79 |
-
gr.Markdown("Proses ini mungkin memakan waktu hingga 50 detik...")
|
80 |
-
|
81 |
gr.Interface(
|
82 |
fn=swap_face,
|
83 |
inputs=[
|
84 |
-
gr.Image(label="Sumber"),
|
85 |
-
gr.Image(label="Target"),
|
86 |
-
gr.Checkbox(label="
|
87 |
],
|
88 |
-
outputs=
|
|
|
|
|
89 |
)
|
90 |
|
91 |
app.launch()
|
|
|
64 |
return output_path
|
65 |
|
66 |
|
67 |
+
html_section_1 = "<div style='text-align:center'><h1>Ai Penganti Wajah</h1></div>"
|
68 |
+
html_section_2 = "<div style='text-align:center'><p>Unggah gambar sumber dan target untuk bertukar wajah, Kemudian anda bisa meningkatkan kualitas wajah dengan cara mencentang opsi dibawah</p></div>"
|
69 |
|
70 |
app = gr.Blocks()
|
71 |
|
72 |
with app:
|
73 |
gr.HTML(html_section_1)
|
74 |
gr.HTML(html_section_2)
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
gr.Interface(
|
76 |
fn=swap_face,
|
77 |
inputs=[
|
78 |
+
gr.Image(label="Gambar Sumber"),
|
79 |
+
gr.Image(label="Gambar Target"),
|
80 |
+
gr.Checkbox(label="Ya", info="Tingkatkan kualitas wajah ?")
|
81 |
],
|
82 |
+
outputs=[
|
83 |
+
gr.Image(label="Hasil Gambar")
|
84 |
+
]
|
85 |
)
|
86 |
|
87 |
app.launch()
|