Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,14 @@
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
4 |
+
sentiment = pipeline("sentiment-analysis")
|
5 |
+
|
6 |
+
def sentiment_getter(input_text):
|
7 |
+
return sentiment(input_text)
|
8 |
+
|
9 |
+
iface = gr.Interface(fn = sentiment_getter,
|
10 |
+
inputs = 'text',
|
11 |
+
outputs = ["text"],
|
12 |
+
title = "sentiment analysis" ,
|
13 |
+
description = "this app is anlyze out sentence and give the results")
|
14 |
+
iface.launch()
|