Spaces:
Runtime error
Runtime error
Commit
•
f16abc3
1
Parent(s):
ca27253
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
! pip install gradio
|
2 |
+
!pip install transformers
|
3 |
+
import gradio as gr
|
4 |
+
from transformers import pipeline
|
5 |
+
sentiment = pipeline("sentiment-analysis")
|
6 |
+
def get_sentiment(input_text):
|
7 |
+
return sentiment(input_text)
|
8 |
+
result=get_sentiment("This course is super awesome!")
|
9 |
+
result
|
10 |
+
iface= gr.Interface(fn = get_sentiment,inputs="text",outputs=["text"],title="Sentiment Analysis",description="Get SentimentNegative/Positive For the given input")
|
11 |
+
iface.launch(auth=('user','AmVrUt'), auth_message="Check your Login Details sent to your e-mail",share="True",inline=False)
|