Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
import os
|
2 |
-
os.system("pip install --upgrade pip")
|
3 |
-
os.system("pip install dlib")
|
4 |
import sys
|
5 |
import face_detection
|
6 |
import PIL
|
@@ -91,4 +89,17 @@ description = "Gradio demo for Drag finetuned Pixel2Style2Pixel. To use it, simp
|
|
91 |
article = "<p style='text-align: center'><a href='https://github.com/justinpinkney/pixel2style2pixel/tree/nw' target='_blank'>Github Repo</a></p><p style='text-align: center'>samples: <img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00001.jpg' alt='Sample00001'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00002.jpg' alt='Sample00002'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00003.jpg' alt='Sample00003'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00004.jpg' alt='Sample00004'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00005.jpg' alt='Sample00005'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00006.jpg' alt='Sample00006'/></p><p>Drag model was fine tuned by Doron Adler</p>"
|
92 |
|
93 |
examples=[['Example00001.jpg'],['Example00002.jpg'],['Example00003.jpg'],['Example00004.jpg'],['Example00005.jpg'],['Example00006.jpg'],['Example00007.jpg']]
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
|
|
|
|
2 |
import sys
|
3 |
import face_detection
|
4 |
import PIL
|
|
|
89 |
article = "<p style='text-align: center'><a href='https://github.com/justinpinkney/pixel2style2pixel/tree/nw' target='_blank'>Github Repo</a></p><p style='text-align: center'>samples: <img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00001.jpg' alt='Sample00001'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00002.jpg' alt='Sample00002'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00003.jpg' alt='Sample00003'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00004.jpg' alt='Sample00004'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00005.jpg' alt='Sample00005'/><img src='https://hf.space/gradioiframe/Norod78/Dragness/file/Sample00006.jpg' alt='Sample00006'/></p><p>Drag model was fine tuned by Doron Adler</p>"
|
90 |
|
91 |
examples=[['Example00001.jpg'],['Example00002.jpg'],['Example00003.jpg'],['Example00004.jpg'],['Example00005.jpg'],['Example00006.jpg'],['Example00007.jpg']]
|
92 |
+
|
93 |
+
demo = gr.Interface(
|
94 |
+
inference,
|
95 |
+
inputs=[gr.Image(type="pil", label="Input")],
|
96 |
+
outputs=[gr.Image(type="pil", label="Output")],
|
97 |
+
title=title,
|
98 |
+
description=description,
|
99 |
+
article=article,
|
100 |
+
examples=examples,
|
101 |
+
allow_flagging="never"
|
102 |
+
)
|
103 |
+
|
104 |
+
demo.queue()
|
105 |
+
demo.launch()
|