Spaces:
Runtime error
Runtime error
Commit
•
c002f9a
1
Parent(s):
f005442
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
3 |
-
import torch
|
4 |
|
5 |
-
pretrained = "rohanphadke/roberta-finetuned-triplebottomline"
|
6 |
-
tokenizer = AutoTokenizer.from_pretrained(pretrained)
|
7 |
-
model = AutoModelForSequenceClassification.from_pretrained(pretrained)
|
8 |
-
threshold = 0.5
|
9 |
|
10 |
labels = {0: 'people', 1: 'planet', 2:'profit'}
|
11 |
return_labels = {'people': 0.25, 'planet':0.5, 'profit':0.75}
|
|
|
1 |
import gradio as gr
|
2 |
+
# from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
3 |
+
# import torch
|
4 |
|
5 |
+
# pretrained = "rohanphadke/roberta-finetuned-triplebottomline"
|
6 |
+
# tokenizer = AutoTokenizer.from_pretrained(pretrained)
|
7 |
+
# model = AutoModelForSequenceClassification.from_pretrained(pretrained)
|
8 |
+
# threshold = 0.5
|
9 |
|
10 |
labels = {0: 'people', 1: 'planet', 2:'profit'}
|
11 |
return_labels = {'people': 0.25, 'planet':0.5, 'profit':0.75}
|