Kelvinhjk commited on
Commit
8efe39c
·
1 Parent(s): f900277

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -81,7 +81,7 @@ 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 len(text) > 0 and len(text) <= 350:
85
  #######
86
  ans0, score0 = QnAfunction(text0, question_answerer0)
87
  if score0 > 0.5:
@@ -90,12 +90,12 @@ if selected == "Roberta base squad2":
90
  else:
91
  st.write(ans0)
92
 
93
- elif len(text) > 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 len(text) > 0 and len(text) <= 350:
99
  # Fed in the question to the model
100
  ans1, score1 = QnAfunction(text1, question_answerer1)
101
  if score1 > 0.5:
@@ -104,5 +104,5 @@ elif selected == "Bert finetuned squad":
104
  else:
105
  st.write(ans1)
106
 
107
- elif len(text) > 350:
108
  st.write("Max characters: 350")
 
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 len(text0) > 0 and len(text0) <= 350:
85
  #######
86
  ans0, score0 = QnAfunction(text0, question_answerer0)
87
  if score0 > 0.5:
 
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 len(text1) > 0 and len(text1) <= 350:
99
  # Fed in the question to the model
100
  ans1, score1 = QnAfunction(text1, question_answerer1)
101
  if score1 > 0.5:
 
104
  else:
105
  st.write(ans1)
106
 
107
+ elif len(text1) > 350:
108
  st.write("Max characters: 350")