sergeyfeldman commited on
Commit
a04f34c
·
1 Parent(s): 1501319

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -21,12 +21,13 @@ def predict(text):
21
  feelings = [(i, j) for i, j in zipped_list if i.startswith('feeling')]
22
  harm = [(i, j) for i, j in zipped_list if i.startswith('harm')]
23
  # keep tops for each one
24
- issues = sorted(issues)[::-1][:3]
25
- feelings = sorted(feelings)[::-1][:3]
26
- harm = sorted(harm)[::-1][:1]
27
  # top is the combo of these
28
  top = issues + feelings + harm
29
  d = {i: j for i, j in top}
 
30
  return d
31
 
32
  iface = gr.Interface(
 
21
  feelings = [(i, j) for i, j in zipped_list if i.startswith('feeling')]
22
  harm = [(i, j) for i, j in zipped_list if i.startswith('harm')]
23
  # keep tops for each one
24
+ #issues = sorted(issues)[::-1][:3]
25
+ #feelings = sorted(feelings)[::-1][:3]
26
+ #harm = sorted(harm)[::-1][:1]
27
  # top is the combo of these
28
  top = issues + feelings + harm
29
  d = {i: j for i, j in top}
30
+ print(text, top)
31
  return d
32
 
33
  iface = gr.Interface(