Kelvinhjk commited on
Commit
fa9ebfa
·
1 Parent(s): 5a91724

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
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
- text = st.text_area("Type question (Eg. What is the duration of the Bachelor of Computer Science program?): ")
80
- if text:
81
  #######
82
- ans, score = QnAfunction(text, question_answerer0)
83
- if score > 0.5:
84
- st.write("Answer: ", ans)
85
- st.write("Score: ", score)
86
  else:
87
- st.write(ans)
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
- text = st.text_area("Type question (Eg. What is the duration of the Bachelor of Computer Science program?): ")
94
- if text:
95
  # Fed in the question to the model
96
- ans, score = QnAfunction(text, question_answerer1)
97
  if score > 0.5:
98
- st.write("Answer: ", ans)
99
- st.write("Score: ", score)
100
  else:
101
- st.write(ans)
 
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)