Spaces:
Running
Running
Commit
·
428a649
1
Parent(s):
2ae65ac
add caching of predsx
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ from gliner import GLiNER
|
|
14 |
# Cache and initialize model + relation extractor
|
15 |
DATA_MODEL_ID = "rafmacalaba/gliner_re_finetuned-v3"
|
16 |
model = GLiNER.from_pretrained(DATA_MODEL_ID, cache_dir=_CACHE_DIR)
|
|
|
17 |
relation_extractor = CustomGLiNERRelationExtractor(model=model, return_index=True)
|
18 |
|
19 |
# Sample text
|
|
|
14 |
# Cache and initialize model + relation extractor
|
15 |
DATA_MODEL_ID = "rafmacalaba/gliner_re_finetuned-v3"
|
16 |
model = GLiNER.from_pretrained(DATA_MODEL_ID, cache_dir=_CACHE_DIR)
|
17 |
+
from relation_extraction import CustomGLiNERRelationExtractor
|
18 |
relation_extractor = CustomGLiNERRelationExtractor(model=model, return_index=True)
|
19 |
|
20 |
# Sample text
|