jytole commited on
Commit
cb8ade1
·
1 Parent(s): 2d00fa5

Initial App Commit

Browse files
Files changed (2) hide show
  1. app.py +12 -0
  2. requirements.txt +1 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ def greet(name):
5
+ return "Hello " + name + "!!"
6
+
7
+ def sentiment(intext):
8
+ classifier = pipeline("sentiment-analysis")
9
+ classifier(intext)
10
+
11
+ iface = gr.Interface(fn=sentiment, inputs="text", outputs="text")
12
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ transformers