harishsohani commited on
Commit
ad8da74
·
verified ·
1 Parent(s): d973dd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
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)