Spaces:
Sleeping
Sleeping
modified the default arguemnt of model_name for extract_keywords_from_doc to use an environmental variable
Browse files
rag_app/utils/generate_keywords_keybert.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
from typing import List, Tuple, Dict, Any
|
2 |
from keybert import KeyBERT
|
|
|
3 |
|
4 |
def extract_keywords_from_doc(
|
5 |
doc: str,
|
6 |
-
model_name: str =
|
7 |
**kwargs: Dict[str, Any]
|
8 |
) -> List[Tuple[str, float]]:
|
9 |
"""
|
|
|
1 |
from typing import List, Tuple, Dict, Any
|
2 |
from keybert import KeyBERT
|
3 |
+
from config import BERT_MODEL
|
4 |
|
5 |
def extract_keywords_from_doc(
|
6 |
doc: str,
|
7 |
+
model_name: str = BERT_MODEL,
|
8 |
**kwargs: Dict[str, Any]
|
9 |
) -> List[Tuple[str, float]]:
|
10 |
"""
|