Sathiyapramod commited on
Commit
c3dddf1
·
verified ·
1 Parent(s): 6692bad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,7 +1,13 @@
1
  import gradio as gr
 
 
 
 
 
 
2
 
3
  def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
  demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  demo.launch()
 
1
  import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ classifiers = pipeline(
5
+ "text-classification",
6
+ model="distilbert/distilbert-base-uncased-finetuned-sst-2-english",
7
+ )
8
 
9
  def greet(name):
10
+ return classifiers(name)
11
 
12
  demo = gr.Interface(fn=greet, inputs="text", outputs="text")
13
  demo.launch()