qisan commited on
Commit
ad3c02f
1 Parent(s): 3a93e63

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,7 +16,7 @@ model = mr.get_model("sentimental_analysis_model", version=1)
16
  #model = joblib.load(model_dir + "/sentimental_analysis_model.pkl")
17
 
18
  def analyse(text):
19
- label = model.predict(text)
20
  return label
21
 
22
  with gr.Blocks() as demo:
@@ -24,7 +24,7 @@ with gr.Blocks() as demo:
24
 
25
  inputs_text=gr.Textbox(placeholder='Type your text for which you want know the sentiment', label='Text')
26
  text_button = gr.Button('Analyse Sentiment')
27
- output_text_sentiment = gr.Textbox(placeholder='Sentiment of the video.', label='Sentiment')
28
  text_button.click(analyse, inputs = inputs_text, outputs = output_text_sentiment)
29
 
30
 
 
16
  #model = joblib.load(model_dir + "/sentimental_analysis_model.pkl")
17
 
18
  def analyse(text):
19
+ label = model(text)
20
  return label
21
 
22
  with gr.Blocks() as demo:
 
24
 
25
  inputs_text=gr.Textbox(placeholder='Type your text for which you want know the sentiment', label='Text')
26
  text_button = gr.Button('Analyse Sentiment')
27
+ output_text_sentiment = gr.Textbox(placeholder='Sentiment of the text.', label='Sentiment')
28
  text_button.click(analyse, inputs = inputs_text, outputs = output_text_sentiment)
29
 
30