Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,4 +6,11 @@ access_token = "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"
|
|
6 |
|
7 |
model = AutoModel.from_pretrained("EkhiAzur/RoBERTA_3", token=access_token)
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
model = AutoModel.from_pretrained("EkhiAzur/RoBERTA_3", token=access_token)
|
8 |
|
9 |
+
classifier = pipeline("text-classification", model=model, max_length=512,
|
10 |
+
padding=True, truncation=True, batch_size=1)
|
11 |
+
|
12 |
+
def prozesatu(testua):
|
13 |
+
prediction = prozesatu.classifier(testua)
|
14 |
+
return f'C1:{prediction["label"]}. Probabilitatea:{prediction["score"]}'
|
15 |
+
|
16 |
+
gr.Interface(fn=prozesatu, inputs="text", outputs="text").launch()
|