nguyennghia0902 commited on
Commit
d6d8560
1 Parent(s): 042b4ce

Update SampleQA.py

Browse files
Files changed (1) hide show
  1. SampleQA.py +4 -1
SampleQA.py CHANGED
@@ -57,7 +57,10 @@ def main():
57
  if st.button("Sample & Predict"):
58
  prediction = ""
59
  prediction = predict(question, text)
60
- st.success(prediction)
 
 
 
61
 
62
  if __name__ == "__main__":
63
  main()
 
57
  if st.button("Sample & Predict"):
58
  prediction = ""
59
  prediction = predict(question, text)
60
+ if prediction == "":
61
+ st.error(prediction)
62
+ else:
63
+ st.success(prediction)
64
 
65
  if __name__ == "__main__":
66
  main()