Spaces:
Runtime error
Runtime error
Commit
·
5fb1a1e
1
Parent(s):
6913291
changed device to cpu
Browse files
app.py
CHANGED
@@ -7,11 +7,12 @@ from preprocessing.helper import get_recommendations
|
|
7 |
|
8 |
CONFIG_FILE = os.path.join("weights", "bert_classifier_deployment_weights")
|
9 |
N_SUGGESTIONS = 3
|
|
|
10 |
|
11 |
|
12 |
@cache
|
13 |
def get_model(config_path: str) -> BertClassifier:
|
14 |
-
bert_classifier = BertClassifier(device=
|
15 |
bert_classifier.load_weights(config_path)
|
16 |
return bert_classifier
|
17 |
|
|
|
7 |
|
8 |
CONFIG_FILE = os.path.join("weights", "bert_classifier_deployment_weights")
|
9 |
N_SUGGESTIONS = 3
|
10 |
+
DEVICE = "cpu"
|
11 |
|
12 |
|
13 |
@cache
|
14 |
def get_model(config_path: str) -> BertClassifier:
|
15 |
+
bert_classifier = BertClassifier(device=DEVICE)
|
16 |
bert_classifier.load_weights(config_path)
|
17 |
return bert_classifier
|
18 |
|