Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
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==""
|
66 |
-
st.
|
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.
|
84 |
if button2:
|
85 |
-
if context
|
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 |
|