Spaces:
Runtime error
Runtime error
Commit
•
e838b9b
1
Parent(s):
a4967e1
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,12 @@ sentences = []
|
|
22 |
|
23 |
st.title("Sentence Similarity")
|
24 |
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
with st.form("submission_form", clear_on_submit=False):
|
28 |
|
@@ -30,9 +35,21 @@ with st.form("submission_form", clear_on_submit=False):
|
|
30 |
|
31 |
sentence_2 = st.text_input("Sentence 2 input")
|
32 |
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
-
|
|
|
36 |
|
37 |
# Perform calculations
|
38 |
|
|
|
22 |
|
23 |
st.title("Sentence Similarity")
|
24 |
|
25 |
+
sidebar_selectbox = st.sidebar.selectbox(
|
26 |
+
"What would you like to work with?",
|
27 |
+
("Compare two sentences", "Bulk upload and mark")
|
28 |
+
)
|
29 |
+
|
30 |
+
# Streamlit form elements (default)
|
31 |
|
32 |
with st.form("submission_form", clear_on_submit=False):
|
33 |
|
|
|
35 |
|
36 |
sentence_2 = st.text_input("Sentence 2 input")
|
37 |
|
38 |
+
submit_button_compare = st.form_submit_button("Compare Sentences")
|
39 |
+
|
40 |
+
|
41 |
+
if sidebar_selectbox == "Bulk upload and mark":
|
42 |
+
with st.form("submission_form", clear_on_submit=False):
|
43 |
+
|
44 |
+
sentence_1 = st.text_input("Sentence 1 input")
|
45 |
+
|
46 |
+
sentence_2 = st.text_input("Sentence 2 input")
|
47 |
+
|
48 |
+
submit_button_compare = st.form_submit_button("Compare Sentences")
|
49 |
+
|
50 |
|
51 |
+
# If submit_button_compare clicked
|
52 |
+
if submit_button_compare:
|
53 |
|
54 |
# Perform calculations
|
55 |
|