Spaces:
Runtime error
Runtime error
johnowhitaker
commited on
Commit
•
360bf8a
1
Parent(s):
071cb1b
Update app.py
Browse files
app.py
CHANGED
@@ -5,14 +5,14 @@ import nest_asyncio
|
|
5 |
|
6 |
st.title('Test')
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
|
18 |
st.write("Outside the form")
|
|
|
5 |
|
6 |
st.title('Test')
|
7 |
|
8 |
+
with st.form("my_form"):
|
9 |
+
st.write("Inside the form")
|
10 |
+
user = st.text_input("Twitter Username")
|
11 |
+
n_tweets = st.slider('How Many Tweets', 20, 2000, 20)
|
12 |
|
13 |
+
# Every form must have a submit button.
|
14 |
+
submitted = st.form_submit_button("Submit")
|
15 |
+
if submitted:
|
16 |
+
st.write("user", user, "n_tweets", n_tweets)
|
17 |
|
18 |
st.write("Outside the form")
|