Spaces:
Running
Running
kovacsvi
commited on
Commit
·
5de5900
1
Parent(s):
2180861
removed duration (less than 60s)
Browse files- interfaces/cap.py +1 -1
- interfaces/cap_minor_media.py +1 -1
interfaces/cap.py
CHANGED
@@ -83,7 +83,7 @@ def build_huggingface_path(language: str, domain: str):
|
|
83 |
else:
|
84 |
return "poltextlab/xlm-roberta-large-pooled-cap"
|
85 |
|
86 |
-
@spaces.GPU
|
87 |
def predict(text, model_id, tokenizer_id):
|
88 |
device = torch.device("cuda:0")
|
89 |
model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto", offload_folder="offload", token=HF_TOKEN).to(device)
|
|
|
83 |
else:
|
84 |
return "poltextlab/xlm-roberta-large-pooled-cap"
|
85 |
|
86 |
+
@spaces.GPU
|
87 |
def predict(text, model_id, tokenizer_id):
|
88 |
device = torch.device("cuda:0")
|
89 |
model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto", offload_folder="offload", token=HF_TOKEN).to(device)
|
interfaces/cap_minor_media.py
CHANGED
@@ -57,7 +57,7 @@ def check_huggingface_path(checkpoint_path: str):
|
|
57 |
def build_huggingface_path(language: str, domain: str):
|
58 |
return ("poltextlab/xlm-roberta-large-pooled-cap-media", "poltextlab/xlm-roberta-large-pooled-cap-minor-v3")
|
59 |
|
60 |
-
@spaces.GPU
|
61 |
def predict(text, major_model_id, minor_model_id, tokenizer_id, HF_TOKEN=None):
|
62 |
device = torch.device("cuda:0")
|
63 |
|
|
|
57 |
def build_huggingface_path(language: str, domain: str):
|
58 |
return ("poltextlab/xlm-roberta-large-pooled-cap-media", "poltextlab/xlm-roberta-large-pooled-cap-minor-v3")
|
59 |
|
60 |
+
@spaces.GPU
|
61 |
def predict(text, major_model_id, minor_model_id, tokenizer_id, HF_TOKEN=None):
|
62 |
device = torch.device("cuda:0")
|
63 |
|