DrishtiSharma commited on
Commit
4b84559
1 Parent(s): 3a21a09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -16,9 +16,9 @@ def decide(text):
16
  padded_tokens = pad_sequences(tokenized_text, maxlen= 200)
17
  result = model.predict(padded_tokens)[0][0]
18
  if result > 0.6 :
19
- return f"Positive review with {result : .0%} prediction score"
20
  elif result < 0.4:
21
- return f"Negative review with {result : .0%} prediction score"
22
  else:
23
  return "Neutral review"
24
 
@@ -31,5 +31,5 @@ examples = [[example_sentence_1], [example_sentence_2]]
31
  description = "Write out a movie review to know the underlying sentiment."
32
 
33
  gr.Interface(decide, inputs= gr.inputs.Textbox( lines=1, placeholder=None, default="", label=None), outputs='text', examples=examples,
34
- title="Sentiment analysis of movie reviews",description=description, allow_flagging="auto",
35
  flagging_dir='flagging records').launch(enable_queue = True, inline=False, share = True)
 
16
  padded_tokens = pad_sequences(tokenized_text, maxlen= 200)
17
  result = model.predict(padded_tokens)[0][0]
18
  if result > 0.6 :
19
+ return f"Positive review with {result : .0%} confidence score"
20
  elif result < 0.4:
21
+ return f"Negative review with {result : .0%} confidence score"
22
  else:
23
  return "Neutral review"
24
 
 
31
  description = "Write out a movie review to know the underlying sentiment."
32
 
33
  gr.Interface(decide, inputs= gr.inputs.Textbox( lines=1, placeholder=None, default="", label=None), outputs='text', examples=examples,
34
+ title="Sentiment analysis of movie reviews", theme = "grass", description=description, allow_flagging="auto",
35
  flagging_dir='flagging records').launch(enable_queue = True, inline=False, share = True)