Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -108,7 +108,9 @@ if button:
|
|
108 |
if (title == '' and summary == ''):
|
109 |
st.write('There is nothing to analyze...')
|
110 |
st.write('Fill at list one of the fields')
|
111 |
-
else:
|
|
|
|
|
112 |
model, tokenizer = load_model()
|
113 |
prediction, prediction_probs = predict(title, summary, model, tokenizer)
|
114 |
ans = get_results(prediction, prediction_probs)
|
|
|
108 |
if (title == '' and summary == ''):
|
109 |
st.write('There is nothing to analyze...')
|
110 |
st.write('Fill at list one of the fields')
|
111 |
+
else:
|
112 |
+
if (summary == ''):
|
113 |
+
st.write('WARNING: you have entered only the title. The accuracy of the prediction may be poor... Please enter summary to improve accuracy.')
|
114 |
model, tokenizer = load_model()
|
115 |
prediction, prediction_probs = predict(title, summary, model, tokenizer)
|
116 |
ans = get_results(prediction, prediction_probs)
|