Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -230,6 +230,9 @@ def predict():
|
|
| 230 |
df = pd.read_csv(filepath)
|
| 231 |
else:
|
| 232 |
df = pd.read_excel(filepath)
|
|
|
|
|
|
|
|
|
|
| 233 |
except Exception as e:
|
| 234 |
print(f'Error reading file: {e}', 'error')
|
| 235 |
return redirect(url_for('index'))
|
|
|
|
| 230 |
df = pd.read_csv(filepath)
|
| 231 |
else:
|
| 232 |
df = pd.read_excel(filepath)
|
| 233 |
+
|
| 234 |
+
# Replace blank/missing cells with "-"
|
| 235 |
+
df.fillna("-", inplace=True)
|
| 236 |
except Exception as e:
|
| 237 |
print(f'Error reading file: {e}', 'error')
|
| 238 |
return redirect(url_for('index'))
|