Spaces:
Runtime error
Runtime error
extracting the scores from my model
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def model_classifier(text):
|
|
| 15 |
return f"the input text is {text}"
|
| 16 |
else:
|
| 17 |
encoded_input=tokenizer(text) #this is where the encoding happens
|
| 18 |
-
scores=model(encoded) #this is is the score for rach values
|
| 19 |
return scores
|
| 20 |
|
| 21 |
|
|
@@ -28,4 +28,4 @@ demo=gr.Interface(
|
|
| 28 |
outputs=gr.Textbox(lines=5,label="Label scores"),
|
| 29 |
title="Hate Classifier Demo App"
|
| 30 |
)
|
| 31 |
-
demo.launch()
|
|
|
|
| 15 |
return f"the input text is {text}"
|
| 16 |
else:
|
| 17 |
encoded_input=tokenizer(text) #this is where the encoding happens
|
| 18 |
+
scores=model(encoded)[0] #this is is the score for rach values
|
| 19 |
return scores
|
| 20 |
|
| 21 |
|
|
|
|
| 28 |
outputs=gr.Textbox(lines=5,label="Label scores"),
|
| 29 |
title="Hate Classifier Demo App"
|
| 30 |
)
|
| 31 |
+
demo.launch(share=True)
|