Update app.py
Browse files
app.py
CHANGED
@@ -41,12 +41,12 @@ st.text_area("Text #1", text_1, height=128)
|
|
41 |
st.text_area("Text #2", text_2, height=128)
|
42 |
st.write(f"Label List #1: {list2text(label_list_1)}")
|
43 |
st.write(f"Label List #2: {list2text(label_list_2)}")
|
44 |
-
st.write(f"Hypothesis #1: {
|
45 |
-
st.write(f"Hypothesis #2: {
|
46 |
|
47 |
text = st.radio("Select Text", ("Text #1", "Text #2", "New Text"))
|
48 |
labels = st.radio("Select Label List", ("Label List #1", "Label List #2", "New Label List"))
|
49 |
-
|
50 |
|
51 |
if text == "Text #1": sequence_to_classify = text_1
|
52 |
elif text == "Text #2": sequence_to_classify = text_2
|
@@ -58,10 +58,10 @@ elif labels == "Label List #2": candidate_labels = label_list_2
|
|
58 |
elif labels == "New Label List":
|
59 |
candidate_labels = st.text_area("New Label List (Pls Input as comma-separated)", value="", height=16).split(",")
|
60 |
|
61 |
-
if
|
62 |
-
elif
|
63 |
-
elif labels == "New
|
64 |
-
|
65 |
|
66 |
Run_Button = st.button("Run", key=None)
|
67 |
if Run_Button == True:
|
|
|
41 |
st.text_area("Text #2", text_2, height=128)
|
42 |
st.write(f"Label List #1: {list2text(label_list_1)}")
|
43 |
st.write(f"Label List #2: {list2text(label_list_2)}")
|
44 |
+
st.write(f"Hypothesis #1: {hypothesis_1}")
|
45 |
+
st.write(f"Hypothesis #2: {hypothesis_2}")
|
46 |
|
47 |
text = st.radio("Select Text", ("Text #1", "Text #2", "New Text"))
|
48 |
labels = st.radio("Select Label List", ("Label List #1", "Label List #2", "New Label List"))
|
49 |
+
hypothesis = st.radio("Select Hypothesis", ("Hypothesis #1", "Hypothesis #2", "New Hypothesis"))
|
50 |
|
51 |
if text == "Text #1": sequence_to_classify = text_1
|
52 |
elif text == "Text #2": sequence_to_classify = text_2
|
|
|
58 |
elif labels == "New Label List":
|
59 |
candidate_labels = st.text_area("New Label List (Pls Input as comma-separated)", value="", height=16).split(",")
|
60 |
|
61 |
+
if hypothesis == "Hypothesis #1": hypothesis_template = hypothesis_1
|
62 |
+
elif hypothesis == "Hypothesis #2": hypothesis_template = hypothesis_2
|
63 |
+
elif labels == "New Hypothesis":
|
64 |
+
hypothesis_template = st.text_area("Hypothesis Template for NLI (Pls Input as comma-separated)", value="", height=16)
|
65 |
|
66 |
Run_Button = st.button("Run", key=None)
|
67 |
if Run_Button == True:
|