rajaramesh commited on
Commit
0aba942
·
verified ·
1 Parent(s): 272e54c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -4,7 +4,8 @@ from transformers import pipeline
4
  import os
5
  os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface"
6
 
7
- pipe=pipeline("sentiment-analysis")
 
8
  text=st.text_area("enter your review")
9
 
10
  if text:
 
4
  import os
5
  os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface"
6
 
7
+ pipe = pipeline("sentiment-analysis", device=-1) # Forces CPU
8
+
9
  text=st.text_area("enter your review")
10
 
11
  if text: