Helder Rodrigues
commited on
Commit
•
eb08918
1
Parent(s):
e24aef3
demo
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ classifier = pipeline("sentiment-analysis")
|
|
5 |
|
6 |
def generate(text):
|
7 |
result = classifier(text)
|
8 |
-
return result
|
9 |
|
10 |
examples = [
|
11 |
["SE is the best company in the world!"],
|
@@ -15,7 +15,7 @@ examples = [
|
|
15 |
demo = gr.Interface(
|
16 |
fn=generate,
|
17 |
inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
|
18 |
-
outputs=gr.outputs.Textbox(label="
|
19 |
examples=examples
|
20 |
)
|
21 |
|
|
|
5 |
|
6 |
def generate(text):
|
7 |
result = classifier(text)
|
8 |
+
return result.label
|
9 |
|
10 |
examples = [
|
11 |
["SE is the best company in the world!"],
|
|
|
15 |
demo = gr.Interface(
|
16 |
fn=generate,
|
17 |
inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
|
18 |
+
outputs=gr.outputs.Textbox(label="Sentiment"),
|
19 |
examples=examples
|
20 |
)
|
21 |
|