Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
|
3 |
from transformers import AutoModel, pipeline, AutoTokenizer, AutoModelForSequenceClassification
|
4 |
|
5 |
-
access_token =
|
6 |
|
7 |
model = AutoModelForSequenceClassification.from_pretrained("EkhiAzur/RoBERTA_3", token=access_token)
|
8 |
|
@@ -22,7 +22,6 @@ def prozesatu(Testua, request: gr.Request):
|
|
22 |
return {"Gai":prediction["score"], "Ez gai": 1-prediction["score"]}
|
23 |
else:
|
24 |
return {"Gai":1-prediction["score"], "Ez gai": prediction["score"]}
|
25 |
-
#return 'C1:{}. Probabilitatea:{:.2f}'.format(prediction["label"], round(prediction["score"], 2))
|
26 |
|
27 |
prozesatu.classifier = classifier
|
28 |
|
|
|
2 |
|
3 |
from transformers import AutoModel, pipeline, AutoTokenizer, AutoModelForSequenceClassification
|
4 |
|
5 |
+
access_token = os.environ['ACCES_TOKEN']
|
6 |
|
7 |
model = AutoModelForSequenceClassification.from_pretrained("EkhiAzur/RoBERTA_3", token=access_token)
|
8 |
|
|
|
22 |
return {"Gai":prediction["score"], "Ez gai": 1-prediction["score"]}
|
23 |
else:
|
24 |
return {"Gai":1-prediction["score"], "Ez gai": prediction["score"]}
|
|
|
25 |
|
26 |
prozesatu.classifier = classifier
|
27 |
|