Spaces:
Sleeping
Sleeping
Fix localhost bug and route name
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ def serve_root_files(filename):
|
|
| 48 |
return "File not found", 404
|
| 49 |
|
| 50 |
# 4. Handle Predictions
|
| 51 |
-
@app.route('/
|
| 52 |
def predict():
|
| 53 |
if 'file' not in request.files:
|
| 54 |
return jsonify({'error': 'No file uploaded'}), 400
|
|
|
|
| 48 |
return "File not found", 404
|
| 49 |
|
| 50 |
# 4. Handle Predictions
|
| 51 |
+
@app.route('/api/classify', methods=['POST'])
|
| 52 |
def predict():
|
| 53 |
if 'file' not in request.files:
|
| 54 |
return jsonify({'error': 'No file uploaded'}), 400
|