Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ os.system(
|
|
| 8 |
|
| 9 |
|
| 10 |
def inference(img):
|
| 11 |
-
os.
|
| 12 |
basewidth = 512
|
| 13 |
wpercent = (basewidth / float(img.size[0]))
|
| 14 |
hsize = int((float(img.size[1]) * float(wpercent)))
|
|
@@ -26,12 +26,10 @@ article = "<p style='text-align: center'><a href='https://' target='_blank'>Comp
|
|
| 26 |
examples = [['images/Blur1.png'], ['images/Blur2.png'], ['images/Blur5.png'],]
|
| 27 |
gr.Interface(
|
| 28 |
inference,
|
| 29 |
-
[gr.
|
| 30 |
-
gr.
|
| 31 |
title=title,
|
| 32 |
description=description,
|
| 33 |
article=article,
|
| 34 |
-
allow_flagging=False,
|
| 35 |
-
allow_screenshot=False,
|
| 36 |
examples=examples
|
| 37 |
-
).launch(debug=True)
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
def inference(img):
|
| 11 |
+
os.makedirs("./test", exist_ok=True)
|
| 12 |
basewidth = 512
|
| 13 |
wpercent = (basewidth / float(img.size[0]))
|
| 14 |
hsize = int((float(img.size[1]) * float(wpercent)))
|
|
|
|
| 26 |
examples = [['images/Blur1.png'], ['images/Blur2.png'], ['images/Blur5.png'],]
|
| 27 |
gr.Interface(
|
| 28 |
inference,
|
| 29 |
+
[gr.components.Image(type="pil", label="Input")],
|
| 30 |
+
gr.components.Image(type="filepath", label="Output"),
|
| 31 |
title=title,
|
| 32 |
description=description,
|
| 33 |
article=article,
|
|
|
|
|
|
|
| 34 |
examples=examples
|
| 35 |
+
).launch(debug=True)
|