Spaces:
Sleeping
Sleeping
Update app/main.py
Browse files- app/main.py +8 -2
app/main.py
CHANGED
|
@@ -13,8 +13,14 @@ import numpy as np
|
|
| 13 |
|
| 14 |
app = FastAPI()
|
| 15 |
|
| 16 |
-
model = BertForSequenceClassification.from_pretrained(
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
model.eval()
|
| 19 |
|
| 20 |
le = LabelEncoder()
|
|
|
|
| 13 |
|
| 14 |
app = FastAPI()
|
| 15 |
|
| 16 |
+
model = BertForSequenceClassification.from_pretrained(
|
| 17 |
+
"JaySenpai/bert-model",
|
| 18 |
+
cache_dir="/code/cache"
|
| 19 |
+
)
|
| 20 |
+
tokenizer = BertTokenizer.from_pretrained(
|
| 21 |
+
"JaySenpai/bert-model",
|
| 22 |
+
cache_dir="/code/cache"
|
| 23 |
+
)
|
| 24 |
model.eval()
|
| 25 |
|
| 26 |
le = LabelEncoder()
|