Aditya757864 commited on
Commit
e7a71fd
·
1 Parent(s): cd1920f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+ sentiment = pipeline('sentiment-analysis')
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
+ examples = ['The movie was very bad', 'Every day is a new opportunity.'],
11
+ article = 'This project is for software engineering with team members Aditya Jadhav, Sujal Kuthe, Sujal Wakalkar, and Adesh Ingle. We developed a web application for sentiment analysis that takes text data as input and classifies whether it is positive or negative.',
12
+ thumbnail = '/content/sentiment-analysis.png',
13
+ theme = gr.themes.Soft())
14
+ iface.launch()