pandalow commited on
Commit
95f7430
·
1 Parent(s): a8e59e3

change device to cpu

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
3
 
4
 
5
  def sentiment_analysis(text:str)->str:
6
- analysis_tools = pipeline("text-classification", model = "boltuix/bert-emotion",device='cuda')
7
  result = analysis_tools(text)
8
 
9
  return f"the label: {result[0]['label']} and the score: {result[0]['score']}"
 
3
 
4
 
5
  def sentiment_analysis(text:str)->str:
6
+ analysis_tools = pipeline("text-classification", model = "boltuix/bert-emotion",device=0)
7
  result = analysis_tools(text)
8
 
9
  return f"the label: {result[0]['label']} and the score: {result[0]['score']}"