Spaces:
Runtime error
Runtime error
bug fix
Browse files
app.py
CHANGED
|
@@ -141,16 +141,16 @@ def main():
|
|
| 141 |
Adjustments to the model and extention with Quantile forecast are coming soon ;)
|
| 142 |
""")
|
| 143 |
|
| 144 |
-
|
| 145 |
# check if the key exists in session state
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
|
| 155 |
RAIN_MAPPING = {
|
| 156 |
"Yes" : 1,
|
|
|
|
| 141 |
Adjustments to the model and extention with Quantile forecast are coming soon ;)
|
| 142 |
""")
|
| 143 |
|
| 144 |
+
try:
|
| 145 |
# check if the key exists in session state
|
| 146 |
+
_ = st.session_state.rain
|
| 147 |
+
_ = st.session_state.temperature
|
| 148 |
+
_ = st.session_state.date
|
| 149 |
+
except AttributeError:
|
| 150 |
+
# otherwise set it to false
|
| 151 |
+
st.session_state.rain = 'Default'
|
| 152 |
+
st.session_state.temperature = 0.0
|
| 153 |
+
st.session_state.date = datetime.date(2022, 10, 24)
|
| 154 |
|
| 155 |
RAIN_MAPPING = {
|
| 156 |
"Yes" : 1,
|