Skip to content

Commit

Permalink
removed empty condition
Browse files Browse the repository at this point in the history
  • Loading branch information
lauragreemko committed Oct 10, 2022
1 parent 92d62d7 commit 9c6ae25
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ def predict():

prediction = model.predict(df['text'])
prediction = prediction[0]
print(prediction)
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 9c6ae25

Please sign in to comment.