Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -80,8 +80,8 @@ st.markdown('<p class="big-font">QnA for Swinburne\'s Bachelor of Computer Scien
|
|
80 |
st.write("- ", selected)
|
81 |
|
82 |
if selected == "Roberta base squad2":
|
83 |
-
text0 = st.text_area("Type question (Eg. What is the duration of the Bachelor of Computer Science program?):")
|
84 |
-
if
|
85 |
#######
|
86 |
ans0, score0 = QnAfunction(text0, question_answerer0)
|
87 |
if score0 > 0.5:
|
@@ -90,12 +90,10 @@ if selected == "Roberta base squad2":
|
|
90 |
else:
|
91 |
st.write(ans0)
|
92 |
|
93 |
-
elif len(text0) > 350:
|
94 |
-
st.write("Max characters: 350")
|
95 |
|
96 |
elif selected == "Bert finetuned squad":
|
97 |
-
text1 = st.text_area("Type question (Eg. What is the duration of the Bachelor of Computer Science program?): ")
|
98 |
-
if
|
99 |
# Fed in the question to the model
|
100 |
ans1, score1 = QnAfunction(text1, question_answerer1)
|
101 |
if score1 > 0.5:
|
@@ -103,6 +101,3 @@ elif selected == "Bert finetuned squad":
|
|
103 |
st.write("Score: ", score1)
|
104 |
else:
|
105 |
st.write(ans1)
|
106 |
-
|
107 |
-
elif len(text1) > 350:
|
108 |
-
st.write("Max characters: 350")
|
|
|
80 |
st.write("- ", selected)
|
81 |
|
82 |
if selected == "Roberta base squad2":
|
83 |
+
text0 = st.text_area("Type question (Eg. What is the duration of the Bachelor of Computer Science program?):", max_chars=350)
|
84 |
+
if text0:
|
85 |
#######
|
86 |
ans0, score0 = QnAfunction(text0, question_answerer0)
|
87 |
if score0 > 0.5:
|
|
|
90 |
else:
|
91 |
st.write(ans0)
|
92 |
|
|
|
|
|
93 |
|
94 |
elif selected == "Bert finetuned squad":
|
95 |
+
text1 = st.text_area("Type question (Eg. What is the duration of the Bachelor of Computer Science program?): ", max_chars=350)
|
96 |
+
if text1:
|
97 |
# Fed in the question to the model
|
98 |
ans1, score1 = QnAfunction(text1, question_answerer1)
|
99 |
if score1 > 0.5:
|
|
|
101 |
st.write("Score: ", score1)
|
102 |
else:
|
103 |
st.write(ans1)
|
|
|
|
|
|