Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,6 @@ from dataclasses import dataclass
|
|
9 |
from pathlib import Path
|
10 |
import spaces
|
11 |
|
12 |
-
@spaces.GPU
|
13 |
@dataclass
|
14 |
class SymbolicConfig:
|
15 |
repo_id: str = "AbstractPhil/bert-beatrix-2048"
|
@@ -30,6 +29,7 @@ model = AutoModelForMaskedLM.from_pretrained(model_dir).eval().cuda()
|
|
30 |
|
31 |
MASK_TOKEN = tokenizer.mask_token or "[MASK]"
|
32 |
|
|
|
33 |
def mask_and_predict(text: str, selected_roles: list[str]):
|
34 |
results = []
|
35 |
masked_text = text
|
|
|
9 |
from pathlib import Path
|
10 |
import spaces
|
11 |
|
|
|
12 |
@dataclass
|
13 |
class SymbolicConfig:
|
14 |
repo_id: str = "AbstractPhil/bert-beatrix-2048"
|
|
|
29 |
|
30 |
MASK_TOKEN = tokenizer.mask_token or "[MASK]"
|
31 |
|
32 |
+
@spaces.GPU
|
33 |
def mask_and_predict(text: str, selected_roles: list[str]):
|
34 |
results = []
|
35 |
masked_text = text
|