Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,8 +17,8 @@ def predict():
|
|
17 |
|
18 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='best2.pt', force_reload=True) # force_reload to recache
|
19 |
|
20 |
-
if not request.method == "POST":
|
21 |
-
return
|
22 |
|
23 |
if request.files.get("image"):
|
24 |
image_file = request.files["image"]
|
@@ -31,4 +31,4 @@ def predict():
|
|
31 |
|
32 |
|
33 |
if __name__ == "__main__":
|
34 |
-
app.run(host="0.0.0.0", port=
|
|
|
17 |
|
18 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='best2.pt', force_reload=True) # force_reload to recache
|
19 |
|
20 |
+
'''if not request.method == "POST":
|
21 |
+
return'''
|
22 |
|
23 |
if request.files.get("image"):
|
24 |
image_file = request.files["image"]
|
|
|
31 |
|
32 |
|
33 |
if __name__ == "__main__":
|
34 |
+
app.run(host="0.0.0.0", port=7860) # debug=True causes Restarting with stat
|