Update llm/huggingfacehub/hf_model.py
Browse files
llm/huggingfacehub/hf_model.py
CHANGED
@@ -26,6 +26,9 @@ logger.addHandler(file_handler)
|
|
26 |
|
27 |
logger.info("Getting information from hf_model module")
|
28 |
|
|
|
|
|
|
|
29 |
|
30 |
class HF_Mistaril(LLMInterface, ABC):
|
31 |
def __init__(self, prompt_entity: str, prompt_id: int = 0):
|
@@ -43,7 +46,7 @@ class HF_Mistaril(LLMInterface, ABC):
|
|
43 |
@staticmethod
|
44 |
def __read_yaml():
|
45 |
try:
|
46 |
-
yaml_file = os.path.join(
|
47 |
with open(yaml_file, 'r') as file:
|
48 |
data = yaml.safe_load(file)
|
49 |
return data
|
@@ -88,7 +91,7 @@ class HF_TinyLlama(LLMInterface, ABC):
|
|
88 |
@staticmethod
|
89 |
def __read_yaml():
|
90 |
try:
|
91 |
-
yaml_file = os.path.join(
|
92 |
with open(yaml_file, 'r') as file:
|
93 |
data = yaml.safe_load(file)
|
94 |
return data
|
|
|
26 |
|
27 |
logger.info("Getting information from hf_model module")
|
28 |
|
29 |
+
path_to_prompts = os.path.join(os.getcwd(), "/llm/")
|
30 |
+
print(path_to_prompts)
|
31 |
+
|
32 |
|
33 |
class HF_Mistaril(LLMInterface, ABC):
|
34 |
def __init__(self, prompt_entity: str, prompt_id: int = 0):
|
|
|
46 |
@staticmethod
|
47 |
def __read_yaml():
|
48 |
try:
|
49 |
+
yaml_file = os.path.join(path_to_prompts, 'prompts.yaml')
|
50 |
with open(yaml_file, 'r') as file:
|
51 |
data = yaml.safe_load(file)
|
52 |
return data
|
|
|
91 |
@staticmethod
|
92 |
def __read_yaml():
|
93 |
try:
|
94 |
+
yaml_file = os.path.join(path_to_prompts, 'prompts.yaml')
|
95 |
with open(yaml_file, 'r') as file:
|
96 |
data = yaml.safe_load(file)
|
97 |
return data
|