ahxan97 commited on
Commit
c98638a
1 Parent(s): 2196ff0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -134,7 +134,7 @@ prompt = st.text_input(" ")
134
 
135
 
136
  if prompt != "":
137
- sbert_saved_model = torch.load("Sbert_saved_model")
138
  model = sbert_saved_model.to("cpu")
139
  tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-mpnet-base-v2")
140
  pipe = TextClassificationPipeline(model= model, tokenizer=tokenizer, return_all_scores=True)
 
134
 
135
 
136
  if prompt != "":
137
+ sbert_saved_model = torch.load("Sbert_saved_model",map_location=torch.device('cpu'))
138
  model = sbert_saved_model.to("cpu")
139
  tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-mpnet-base-v2")
140
  pipe = TextClassificationPipeline(model= model, tokenizer=tokenizer, return_all_scores=True)