Spaces:
Build error
Build error
Max-Dupler
commited on
Commit
·
20da062
1
Parent(s):
80ea0c3
adding test survey
Browse files
app.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
def main():
|
| 4 |
+
st.title("Basic Survey")
|
| 5 |
+
|
| 6 |
+
# Introductory text
|
| 7 |
+
st.write("Welcome to our basic survey! Please fill out the information below.")
|
| 8 |
+
|
| 9 |
+
# Name input
|
| 10 |
+
name = st.text_input("What's your name?")
|
| 11 |
+
|
| 12 |
+
# Age input
|
| 13 |
+
age = st.number_input("How old are you?", min_value=1, max_value=100)
|
| 14 |
+
|
| 15 |
+
# Gender selection
|
| 16 |
+
gender = st.radio("Select your gender:", ("Male", "Female", "Other"))
|
| 17 |
+
|
| 18 |
+
# Feedback text area
|
| 19 |
+
feedback = st.text_area("Your feedback:")
|
| 20 |
+
|
| 21 |
+
# Submit button
|
| 22 |
+
if st.button("Submit"):
|
| 23 |
+
st.success(f"Thank you {name} for your submission!")
|
| 24 |
+
st.write(f"Name: {name}")
|
| 25 |
+
st.write(f"Age: {age}")
|
| 26 |
+
st.write(f"Gender: {gender}")
|
| 27 |
+
st.write(f"Feedback: {feedback}")
|
| 28 |
+
|
| 29 |
+
if __name__ == "__main__":
|
| 30 |
+
main()
|