Spaces:
Running
on
T4
Running
on
T4
Ahsen Khaliq
commited on
Commit
•
c586b21
1
Parent(s):
6321605
Update app.py
Browse files
app.py
CHANGED
@@ -55,10 +55,6 @@ import scipy.ndimage
|
|
55 |
import requests
|
56 |
|
57 |
def inference(img):
|
58 |
-
basewidth = 512
|
59 |
-
wpercent = (basewidth/float(img.size[0]))
|
60 |
-
hsize = int((float(img.size[1])*float(wpercent)))
|
61 |
-
img = img.resize((basewidth,hsize), Image.ANTIALIAS)
|
62 |
out = face2paint(img, 512)
|
63 |
return out
|
64 |
|
@@ -68,4 +64,4 @@ description = "Gradio demo for AnimeGanv2 Face Portrait v2. To use it, simply up
|
|
68 |
article = "<p style='text-align: center'><a href='https://github.com/bryandlee/animegan2-pytorch' target='_blank'>Github Repo</a></p>"
|
69 |
|
70 |
examples=[['groot.jpeg']]
|
71 |
-
gr.Interface(inference, gr.inputs.Image(type="pil"), gr.outputs.Image(type="pil"),title=title,description=description,article=article,examples=examples,enable_queue=True).launch()
|
|
|
55 |
import requests
|
56 |
|
57 |
def inference(img):
|
|
|
|
|
|
|
|
|
58 |
out = face2paint(img, 512)
|
59 |
return out
|
60 |
|
|
|
64 |
article = "<p style='text-align: center'><a href='https://github.com/bryandlee/animegan2-pytorch' target='_blank'>Github Repo</a></p>"
|
65 |
|
66 |
examples=[['groot.jpeg']]
|
67 |
+
gr.Interface(inference, gr.inputs.Image(type="pil",shape=(512,512)), gr.outputs.Image(type="pil"),title=title,description=description,article=article,examples=examples,enable_queue=True).launch()
|