pclarke commited on
Commit
6958c0d
·
1 Parent(s): 61f88f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -1
app.py CHANGED
@@ -31,7 +31,7 @@ def sentiment(text, state):
31
  f"{r['text']}: valence={r['valence']:0.3f}, arousal={r['arousal']:0.3f}, confidence=arousal={r['confidence']:0.3f}"
32
  for r in state
33
  ]
34
- return "\n".join(res_txt), df, state
35
 
36
 
37
  iface = gr.Interface(
@@ -49,6 +49,26 @@ iface = gr.Interface(
49
  x_lim=[-1.05, 1.05],
50
  y_lim=[-1.05, 1.05],
51
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  "state",
53
  ],
54
  title=TITLE,
 
31
  f"{r['text']}: valence={r['valence']:0.3f}, arousal={r['arousal']:0.3f}, confidence=arousal={r['confidence']:0.3f}"
32
  for r in state
33
  ]
34
+ return "\n".join(res_txt), df, df, df, state
35
 
36
 
37
  iface = gr.Interface(
 
49
  x_lim=[-1.05, 1.05],
50
  y_lim=[-1.05, 1.05],
51
  ),
52
+ gr.ScatterPlot(
53
+ x="valence",
54
+ y="confidence",
55
+ tooltip="text",
56
+ size="words",
57
+ size_legend_position="none",
58
+ interactive=False,
59
+ x_lim=[-1.05, 1.05],
60
+ y_lim=[-1.05, 1.05],
61
+ ),
62
+ gr.ScatterPlot(
63
+ x="arousal",
64
+ y="confidence",
65
+ tooltip="text",
66
+ size="words",
67
+ size_legend_position="none",
68
+ interactive=False,
69
+ x_lim=[-1.05, 1.05],
70
+ y_lim=[-1.05, 1.05],
71
+ ),
72
  "state",
73
  ],
74
  title=TITLE,