EkhiAzur commited on
Commit
e07cb10
1 Parent(s): 7bb9b0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
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
- gr.Interface.load(model).launch()
 
 
 
 
 
 
 
 
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()