lbiester commited on
Commit
a2d03db
·
verified ·
1 Parent(s): ff4ab6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -16
app.py CHANGED
@@ -37,21 +37,21 @@ with demo:
37
 
38
  with gr.TabItem("Multiple Inputs"):
39
  gr.Markdown("A more complex interface for sentiment analysis with multiple inputs, including a dropdown, and some examples")
40
- # demo = gr.Interface(
41
- # predict_sentiment,
42
- # [
43
- # gr.Textbox(placeholder="Your text input"),
44
- # gr.Dropdown(
45
- # ["finiteautomata/bertweet-base-sentiment-analysis", "vader"], label="Model"
46
- # ),
47
- # ],
48
- # "text",
49
- # examples=[
50
- # ["Happy smile", "vader"],
51
- # ["Happy smile", "finiteautomata/bertweet-base-sentiment-analysis"],
52
- # ["Sad frown", "vader"],
53
- # ["Sad frown", "finiteautomata/bertweet-base-sentiment-analysis"],
54
- # ]
55
- # )
56
 
57
  demo.launch()
 
37
 
38
  with gr.TabItem("Multiple Inputs"):
39
  gr.Markdown("A more complex interface for sentiment analysis with multiple inputs, including a dropdown, and some examples")
40
+ demo = gr.Interface(
41
+ fn=predict_sentiment,
42
+ inputs=[
43
+ gr.Textbox(placeholder="Your text input"),
44
+ gr.Dropdown(
45
+ ["finiteautomata/bertweet-base-sentiment-analysis", "vader"], label="Model"
46
+ ),
47
+ ],
48
+ outputs="label",
49
+ examples=[
50
+ ["Happy smile", "vader"],
51
+ ["Happy smile", "finiteautomata/bertweet-base-sentiment-analysis"],
52
+ ["Sad frown", "vader"],
53
+ ["Sad frown", "finiteautomata/bertweet-base-sentiment-analysis"],
54
+ ]
55
+ )
56
 
57
  demo.launch()