Skip to content

Commit

Permalink
added empty condition
Browse files Browse the repository at this point in the history
  • Loading branch information
lauragreemko committed Oct 10, 2022
1 parent cbc7d09 commit c910b83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def predict():
prediction = prediction[0]
if prediction == '0':
prediction = 'The sentiment of this tweet is positive'
elif prediction == '':
return render_template('index.html')
else:
prediction = 'The sentiment of this tweet is negative'
return render_template('predict.html', predict=prediction)
Expand Down

0 comments on commit c910b83

Please sign in to comment.