Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
from transformers import AutoModel, pipeline
|
4 |
|
5 |
access_token = "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"
|
6 |
|
@@ -19,4 +19,6 @@ def prozesatu(testua):
|
|
19 |
prediction = prozesatu.classifier(testua)
|
20 |
return f'C1:{prediction["label"]}. Probabilitatea:{prediction["score"]}'
|
21 |
|
|
|
|
|
22 |
gr.Interface(fn=prozesatu, inputs="text", outputs="text").launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
from transformers import AutoModel, pipeline, AutoTokenizer
|
4 |
|
5 |
access_token = "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"
|
6 |
|
|
|
19 |
prediction = prozesatu.classifier(testua)
|
20 |
return f'C1:{prediction["label"]}. Probabilitatea:{prediction["score"]}'
|
21 |
|
22 |
+
prozesatu.classifier = classifier
|
23 |
+
|
24 |
gr.Interface(fn=prozesatu, inputs="text", outputs="text").launch()
|