Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,4 @@
|
|
1 |
import gradio as gr
|
2 |
-
import torch
|
3 |
-
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
4 |
-
|
5 |
-
model = AutoModelForSequenceClassification.from_pretrained("gsar78/Greek_Sentiment")
|
6 |
-
tokenizer = AutoTokenizer.from_pretrained("gsar78/Greek_Sentiment")
|
7 |
|
8 |
def predict(text):
|
9 |
# Tokenize the input text
|
@@ -34,8 +29,8 @@ iface = gr.Interface(
|
|
34 |
fn=predict,
|
35 |
inputs="text",
|
36 |
outputs=[
|
37 |
-
gr.
|
38 |
-
gr.
|
39 |
],
|
40 |
title="Hellenic Sentiment AI",
|
41 |
description=None,
|
@@ -54,4 +49,4 @@ iface = gr.Interface(
|
|
54 |
footer="Development by Geo Sar"
|
55 |
)
|
56 |
|
57 |
-
iface.launch()
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def predict(text):
|
4 |
# Tokenize the input text
|
|
|
29 |
fn=predict,
|
30 |
inputs="text",
|
31 |
outputs=[
|
32 |
+
gr.Textbox(label="Prediction"),
|
33 |
+
gr.Label(label="Label Confidence")
|
34 |
],
|
35 |
title="Hellenic Sentiment AI",
|
36 |
description=None,
|
|
|
49 |
footer="Development by Geo Sar"
|
50 |
)
|
51 |
|
52 |
+
iface.launch()
|