Spaces:
Runtime error
Runtime error
Jan Štihec
commited on
Commit
•
ab7069b
1
Parent(s):
a6a9834
Input validity check update.
Browse files
app.py
CHANGED
@@ -121,6 +121,12 @@ def run_ui():
|
|
121 |
st.warning('To ensure accurate searching, please keep your fact under 75 characters.')
|
122 |
st.session_state.valid_inputs_received = False
|
123 |
st.stop()
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
elif submitted or st.session_state.valid_inputs_received:
|
126 |
pubmed_query = GPTHelper.gpt35_rephrase(fact) # Call gpt3.5 to rephrase the fact as a PubMed query.
|
|
|
121 |
st.warning('To ensure accurate searching, please keep your fact under 75 characters.')
|
122 |
st.session_state.valid_inputs_received = False
|
123 |
st.stop()
|
124 |
+
|
125 |
+
elif submitted and '?' in fact:
|
126 |
+
st.warning('Please state a fact. PubMed Fact Checker is good at verifying facts, '
|
127 |
+
'it is not meant to answer questions.')
|
128 |
+
st.session_state.valid_inputs_received = False
|
129 |
+
st.stop()
|
130 |
|
131 |
elif submitted or st.session_state.valid_inputs_received:
|
132 |
pubmed_query = GPTHelper.gpt35_rephrase(fact) # Call gpt3.5 to rephrase the fact as a PubMed query.
|