DrishtiSharma commited on
Commit
de57948
1 Parent(s): 6b35d8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,7 +15,7 @@ with open('tokenizer.pickle', 'rb') as f:
15
 
16
 
17
  def predict_sentiment(text):
18
- sentiment = ['Do you really dislike the movie so much?','Hmm...your thoughts are neutral about the movie.','Wow! Your a big fan.']
19
  sequence_test = tokenizer.texts_to_sequences([text])
20
  padded_test = pad_sequences(sequence_test, maxlen= 52)
21
  text=padded_test
@@ -23,7 +23,7 @@ def predict_sentiment(text):
23
  X = [text for _ in range(len(model.input))]
24
  a=model.predict(X, verbose=0)
25
  return sentiment[np.around(a, decimals=0).argmax(axis=1)[0]]
26
- description = "Give a review of a movie that you like(or hate, sarcasm intended XD) and the model will let you know just how much your review truely reflects your emotions. "
27
 
28
 
29
  #Gradio app
 
15
 
16
 
17
  def predict_sentiment(text):
18
+ sentiment = ['I guess, I liked the movie, but I'm not sure it's my favorite.']
19
  sequence_test = tokenizer.texts_to_sequences([text])
20
  padded_test = pad_sequences(sequence_test, maxlen= 52)
21
  text=padded_test
 
23
  X = [text for _ in range(len(model.input))]
24
  a=model.predict(X, verbose=0)
25
  return sentiment[np.around(a, decimals=0).argmax(axis=1)[0]]
26
+ description = "Provide an opinion regarding a movie and this app will suggest what the underlying sentiment is. "
27
 
28
 
29
  #Gradio app