QuratulainButt commited on
Commit
75ce8c3
1 Parent(s): 1a29fe4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ model_name = "distilbert/distilbert-base-uncased-finetuned-sst-2-english"
5
  sentiment_analysis = pipeline("text-classification", model=model_name)
6
 
7
  def pipe(text):
8
- return "The entered sentence is " + str(sentiment_analysis (text)(0)['label'])+ "!"
9
 
10
 
11
 
@@ -15,5 +15,5 @@ demo = gr.Interface(
15
  outputs=["text"],
16
  )
17
 
18
- demo.launch(share=='True')
19
 
 
5
  sentiment_analysis = pipeline("text-classification", model=model_name)
6
 
7
  def pipe(text):
8
+ return "The entered sentence is: " + str(sentiment_analysis (text)[0]["label"])+ "!"
9
 
10
 
11
 
 
15
  outputs=["text"],
16
  )
17
 
18
+ demo.launch()
19