Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,9 +80,16 @@ with tab1:
|
|
| 80 |
return 0
|
| 81 |
else:
|
| 82 |
return value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
building_mag_prediction_data['et0_fao_evapotranspiration'] = building_mag_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
|
| 85 |
-
|
|
|
|
| 86 |
st.dataframe(building_mag_prediction_data)
|
| 87 |
|
| 88 |
# Making the predictions and getting the latest data
|
|
|
|
| 80 |
return 0
|
| 81 |
else:
|
| 82 |
return value
|
| 83 |
+
|
| 84 |
+
def add_small_value_if_zero(value):
|
| 85 |
+
if value == 0:
|
| 86 |
+
return value + 0.0001
|
| 87 |
+
else:
|
| 88 |
+
return value
|
| 89 |
|
| 90 |
building_mag_prediction_data['et0_fao_evapotranspiration'] = building_mag_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
|
| 91 |
+
building_mag_prediction_data['et0_fao_evapotranspiration'] = building_mag_prediction_data['et0_fao_evapotranspiration'].apply(add_small_value_if_zero)
|
| 92 |
+
|
| 93 |
st.dataframe(building_mag_prediction_data)
|
| 94 |
|
| 95 |
# Making the predictions and getting the latest data
|