Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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]]
|
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",
|