Update app.py
Browse files
app.py
CHANGED
|
@@ -11,8 +11,7 @@ from runpy import run_path
|
|
| 11 |
import numpy as np
|
| 12 |
|
| 13 |
|
| 14 |
-
examples = [
|
| 15 |
-
['./sample2.png'],
|
| 16 |
]
|
| 17 |
#['./Sample3.png'],['./Sample4.png'],['./Sample5.png'],['./Sample6.png']
|
| 18 |
|
|
@@ -34,7 +33,7 @@ def inference(img):
|
|
| 34 |
|
| 35 |
# 'Downsampled Image'
|
| 36 |
#### Resize the longer edge of the input image
|
| 37 |
-
max_res =
|
| 38 |
width, height = img.size
|
| 39 |
if max(width,height) > max_res:
|
| 40 |
scale = max_res /max(width,height)
|
|
|
|
| 11 |
import numpy as np
|
| 12 |
|
| 13 |
|
| 14 |
+
examples = [{'image' : './sample1.png'}
|
|
|
|
| 15 |
]
|
| 16 |
#['./Sample3.png'],['./Sample4.png'],['./Sample5.png'],['./Sample6.png']
|
| 17 |
|
|
|
|
| 33 |
|
| 34 |
# 'Downsampled Image'
|
| 35 |
#### Resize the longer edge of the input image
|
| 36 |
+
max_res = 400
|
| 37 |
width, height = img.size
|
| 38 |
if max(width,height) > max_res:
|
| 39 |
scale = max_res /max(width,height)
|