GirishKiran commited on
Commit
d8dee79
1 Parent(s): 703b7ee

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -242,11 +242,16 @@ def predict_sentiment(p):
242
  pic = draw_bar_plot(df_out, title=title, xlabel=xlabel)
243
  return pic.get_figure(), df_out.to_json()
244
 
 
245
  import gradio
246
- in_box = [gradio.Textbox(lines=1, label="Input request", placeholder="your message")]
247
  out_box = [gradio.Plot(label="Sentiment Score:"),
248
- gradio.Textbox(lines=4, label="Response Raw JSON Data:")]
 
 
249
 
250
  gradio.Interface(fn=predict_sentiment,
251
  inputs=in_box,
252
- outputs=out_box).launch(debug=True)
 
 
 
242
  pic = draw_bar_plot(df_out, title=title, xlabel=xlabel)
243
  return pic.get_figure(), df_out.to_json()
244
 
245
+
246
  import gradio
247
+ in_box = [gradio.Textbox(lines=1, label="Input", placeholder="type text here")]
248
  out_box = [gradio.Plot(label="Sentiment Score:"),
249
+ gradio.Textbox(lines=4, label="Raw JSON Response:")]
250
+ title = "Sentiment Analysis: Understanding the Emotional Tone of Text"
251
+ desc = "Sentiment analysis is a powerful tool that can be used to gain insights into how people feel about the world around them."
252
 
253
  gradio.Interface(fn=predict_sentiment,
254
  inputs=in_box,
255
+ outputs=out_box,
256
+ title=title,
257
+ description=desc).launch(debug=True)