pclarke commited on
Commit
6b960aa
·
1 Parent(s): 0a5e04b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -31,12 +31,14 @@ def sentiment(text, state):
31
  if state == None:
32
  state = []
33
  state.append(res)
34
- df = pd.DataFrame(state)
35
  res_txt = [
36
  f"{r['text']}: valence={r['valence']:0.3f}, arousal={r['arousal']:0.3f}, confidence=arousal={r['confidence']:0.3f}"
37
  for r in state
38
  ]
39
- return "\n".join(res_txt), df, state
 
 
40
 
41
 
42
  iface = gr.Interface(
 
31
  if state == None:
32
  state = []
33
  state.append(res)
34
+ # df = pd.DataFrame(state)
35
  res_txt = [
36
  f"{r['text']}: valence={r['valence']:0.3f}, arousal={r['arousal']:0.3f}, confidence=arousal={r['confidence']:0.3f}"
37
  for r in state
38
  ]
39
+ return "\n".join(res_txt),
40
+ # df,
41
+ state
42
 
43
 
44
  iface = gr.Interface(