Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -76,26 +76,26 @@ with st.sidebar:
|
|
76 |
if selected == "Roberta base squad2":
|
77 |
st.markdown('<p class="big-font">QnA for Swinburne\'s Bachelor of Computer Science progrom</p>', unsafe_allow_html=True)
|
78 |
st.write("- ", selected)
|
79 |
-
|
80 |
-
if
|
81 |
#######
|
82 |
-
|
83 |
-
if
|
84 |
-
st.write("Answer: ",
|
85 |
-
st.write("Score: ",
|
86 |
else:
|
87 |
-
st.write(
|
88 |
|
89 |
|
90 |
elif selected == "Bert finetuned squad":
|
91 |
st.markdown('<p class="big-font">QnA for Swinburne\'s Bachelor of Computer Science progrom</p>', unsafe_allow_html=True)
|
92 |
st.write("- ", selected)
|
93 |
-
|
94 |
-
if
|
95 |
# Fed in the question to the model
|
96 |
-
|
97 |
if score > 0.5:
|
98 |
-
st.write("Answer: ",
|
99 |
-
st.write("Score: ",
|
100 |
else:
|
101 |
-
st.write(
|
|
|
76 |
if selected == "Roberta base squad2":
|
77 |
st.markdown('<p class="big-font">QnA for Swinburne\'s Bachelor of Computer Science progrom</p>', unsafe_allow_html=True)
|
78 |
st.write("- ", selected)
|
79 |
+
text0 = st.text_area("Type question (Eg. What is the duration of the Bachelor of Computer Science program?): ")
|
80 |
+
if text0:
|
81 |
#######
|
82 |
+
ans0, score0 = QnAfunction(text0, question_answerer0)
|
83 |
+
if score0 > 0.5:
|
84 |
+
st.write("Answer: ", ans0)
|
85 |
+
st.write("Score: ", score0)
|
86 |
else:
|
87 |
+
st.write(ans0)
|
88 |
|
89 |
|
90 |
elif selected == "Bert finetuned squad":
|
91 |
st.markdown('<p class="big-font">QnA for Swinburne\'s Bachelor of Computer Science progrom</p>', unsafe_allow_html=True)
|
92 |
st.write("- ", selected)
|
93 |
+
text1 = st.text_area("Type question (Eg. What is the duration of the Bachelor of Computer Science program?): ")
|
94 |
+
if text1:
|
95 |
# Fed in the question to the model
|
96 |
+
ans1, score1 = QnAfunction(text1, question_answerer1)
|
97 |
if score > 0.5:
|
98 |
+
st.write("Answer: ", ans1)
|
99 |
+
st.write("Score: ", score1)
|
100 |
else:
|
101 |
+
st.write(ans1)
|