Spaces:
Sleeping
Sleeping
Commit ·
09dc8fd
1
Parent(s): f23444f
Revert "Update app.py"
Browse filesThis reverts commit f23444f970187acaf3f45e43e5ae01b55d561968.
app.py
CHANGED
|
@@ -32,11 +32,11 @@ def upload():
|
|
| 32 |
f = request.files['image']
|
| 33 |
|
| 34 |
#print("current path")
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
|
| 41 |
img=image.load_img(filepath,target_size=(224,224))
|
| 42 |
img=image.img_to_array(img)
|
|
|
|
| 32 |
f = request.files['image']
|
| 33 |
|
| 34 |
#print("current path")
|
| 35 |
+
basepath = os.path.dirname(__file__)
|
| 36 |
+
print("current path", basepath)
|
| 37 |
+
filepath = os.path.join(basepath,'uploads',f.filename)
|
| 38 |
+
print("upload folder is ", filepath)
|
| 39 |
+
f.save(filepath)
|
| 40 |
|
| 41 |
img=image.load_img(filepath,target_size=(224,224))
|
| 42 |
img=image.img_to_array(img)
|