Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Fix: Trigger rebuild
Browse files
app.py
CHANGED
|
@@ -62,7 +62,7 @@ tokenizer_flavours = AutoTokenizer.from_pretrained(
|
|
| 62 |
model_flavours = BertMultiHeadRegressor(
|
| 63 |
pretrained_model_name=MODEL_BASE
|
| 64 |
)
|
| 65 |
-
state = load_file(weights_path)
|
| 66 |
_ = model_flavours.load_state_dict(state, strict=False) # strict=True wenn Keys exakt passen
|
| 67 |
|
| 68 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 62 |
model_flavours = BertMultiHeadRegressor(
|
| 63 |
pretrained_model_name=MODEL_BASE
|
| 64 |
)
|
| 65 |
+
state = load_file(weights_path) # safetensors -> dict[str, Tensor]
|
| 66 |
_ = model_flavours.load_state_dict(state, strict=False) # strict=True wenn Keys exakt passen
|
| 67 |
|
| 68 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|