Update app.py
Browse files
app.py
CHANGED
|
@@ -64,6 +64,12 @@ def predict_need_maintenance_for_batch ():
|
|
| 64 |
try:
|
| 65 |
# Get the uploaded CSV file from the request
|
| 66 |
file = request.files ['file']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
# Read the file into a DataFrame
|
| 69 |
input_df = pd.read_csv (file)
|
|
|
|
| 64 |
try:
|
| 65 |
# Get the uploaded CSV file from the request
|
| 66 |
file = request.files ['file']
|
| 67 |
+
|
| 68 |
+
if file.filename == "":
|
| 69 |
+
return jsonify({
|
| 70 |
+
"status": "error",
|
| 71 |
+
"message": "No file selected"
|
| 72 |
+
}), 400
|
| 73 |
|
| 74 |
# Read the file into a DataFrame
|
| 75 |
input_df = pd.read_csv (file)
|