nickprock commited on
Commit
7ad2f16
1 Parent(s): 5d46de5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,8 +8,8 @@ dictionary={0:'not-hateful',
8
 
9
 
10
  def greet(text, dictionary=dictionary):
11
- response = model(text)
12
- return dictionary[response[0]][label]
13
 
14
  demo = gr.Interface(fn=greet,
15
  inputs="text",
 
8
 
9
 
10
  def greet(text, dictionary=dictionary):
11
+ response = model([text])
12
+ return dictionary[response[0].item()]
13
 
14
  demo = gr.Interface(fn=greet,
15
  inputs="text",