Update llm/llamacpp/lc_model.py
Browse files- llm/llamacpp/lc_model.py +7 -5
llm/llamacpp/lc_model.py
CHANGED
@@ -10,7 +10,7 @@ from langchain_community.llms import LlamaCpp
|
|
10 |
from llm.config import config
|
11 |
from llm.lc_interface import LCInterface
|
12 |
|
13 |
-
print(os.getcwd())
|
14 |
|
15 |
print("Current path : ", os.path.dirname(os.path.realpath(__file__)))
|
16 |
|
@@ -27,11 +27,13 @@ file_handler.setFormatter(formatted)
|
|
27 |
|
28 |
logger.addHandler(file_handler)
|
29 |
|
30 |
-
|
31 |
-
|
|
|
|
|
32 |
|
33 |
-
|
34 |
-
|
35 |
|
36 |
class LC_TinyLlama(LCInterface, ABC):
|
37 |
def __init__(self, prompt_entity: str, prompt_id: int = 0):
|
|
|
10 |
from llm.config import config
|
11 |
from llm.lc_interface import LCInterface
|
12 |
|
13 |
+
# print(os.getcwd())
|
14 |
|
15 |
print("Current path : ", os.path.dirname(os.path.realpath(__file__)))
|
16 |
|
|
|
27 |
|
28 |
logger.addHandler(file_handler)
|
29 |
|
30 |
+
try:
|
31 |
+
os.chdir('..')
|
32 |
+
except FileNotFoundError:
|
33 |
+
print("Error: Could not move up. You might be at the root directory.")
|
34 |
|
35 |
+
print("Current path after : ", os.path.dirname(os.path.realpath(__file__)))
|
36 |
+
|
37 |
|
38 |
class LC_TinyLlama(LCInterface, ABC):
|
39 |
def __init__(self, prompt_entity: str, prompt_id: int = 0):
|