Spaces:
Runtime error
Runtime error
Commit ·
6923495
1
Parent(s): d4ed84d
Create sentiment_2_transformers
Browse files- sentiment_2_transformers +11 -0
sentiment_2_transformers
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
def get_sentiment(input_text):
|
| 5 |
+
return sentiment(input_text)
|
| 6 |
+
iface = gr.Interface(fn=get_sentiment,
|
| 7 |
+
inputs="text",
|
| 8 |
+
outputs=["text"],
|
| 9 |
+
title="Sentiment Analysis",
|
| 10 |
+
theme='dark')
|
| 11 |
+
iface.launch(auth=('nacho','nacho'))
|