Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,5 +39,10 @@ if submit_button:
|
|
| 39 |
if value:
|
| 40 |
st.write(f'- {option}')
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
# 显示感谢信息或其他处理
|
| 43 |
st.write('谢谢参与调查!')
|
|
|
|
| 39 |
if value:
|
| 40 |
st.write(f'- {option}')
|
| 41 |
|
| 42 |
+
# 将用户的选择写入文件
|
| 43 |
+
with open('user_data.txt', 'a') as file:
|
| 44 |
+
file.write(f'Question: {question}\n')
|
| 45 |
+
file.write(f'Option: {options}\n\n')
|
| 46 |
+
|
| 47 |
# 显示感谢信息或其他处理
|
| 48 |
st.write('谢谢参与调查!')
|