Spaces:
Runtime error
Runtime error
Timothyxxx
commited on
Commit
·
6e02b9f
1
Parent(s):
0e410e2
Debug
Browse files
app.py
CHANGED
|
@@ -181,10 +181,17 @@ elif selected_language == 'Python':
|
|
| 181 |
else:
|
| 182 |
raise ValueError(f'{selected_language} language is not supported.')
|
| 183 |
|
| 184 |
-
question
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
button = st.button("Run! Generate Binder program to solve the question.")
|
| 189 |
if not button:
|
| 190 |
st.stop()
|
|
|
|
| 181 |
else:
|
| 182 |
raise ValueError(f'{selected_language} language is not supported.')
|
| 183 |
|
| 184 |
+
if 'question' not in st.session_state:
|
| 185 |
+
question = st.text_input(
|
| 186 |
+
"Ask a question about the table:",
|
| 187 |
+
value=EXAMPLE_TABLES[selected_table_title][1],
|
| 188 |
+
)
|
| 189 |
+
else:
|
| 190 |
+
question = st.text_input(
|
| 191 |
+
"Ask a question about the table:",
|
| 192 |
+
value=st.session_state.question
|
| 193 |
+
)
|
| 194 |
+
|
| 195 |
button = st.button("Run! Generate Binder program to solve the question.")
|
| 196 |
if not button:
|
| 197 |
st.stop()
|