kxx-kkk commited on
Commit
0042198
1 Parent(s): 0239b74

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -62,8 +62,8 @@ with tab1:
62
  # perform question answering when "get answer" button clicked
63
  button = st.button("Get answer", key="textInput")
64
  if button:
65
- if context=="" and question=="":
66
- st.warning ("Please enter BOTH the context and the question")
67
  else:
68
  question_answering(context, question)
69
 
@@ -80,10 +80,10 @@ with tab2:
80
  question = st.text_input(label="Enter your question", value="Enter question here")
81
 
82
  # perform question answering when "get answer" button clicked
83
- button2 = st.button("Get answer", key="fileInput")
84
  if button2:
85
- if context is None and question is None:
86
- st.warning ("Please enter BOTH the context and the question")
87
  else:
88
  question_answering(context, question)
89
 
 
62
  # perform question answering when "get answer" button clicked
63
  button = st.button("Get answer", key="textInput")
64
  if button:
65
+ if context=="" or question=="":
66
+ st.error ("Please enter BOTH the context and the question", icon="🚨")
67
  else:
68
  question_answering(context, question)
69
 
 
80
  question = st.text_input(label="Enter your question", value="Enter question here")
81
 
82
  # perform question answering when "get answer" button clicked
83
+ button2 = st.error("Get answer", key="fileInput")
84
  if button2:
85
+ if context=="" or question=="":
86
+ st.warning ("Please enter BOTH the context and the question", icon="🚨")
87
  else:
88
  question_answering(context, question)
89