Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|