CineAI commited on
Commit
ccc21ac
1 Parent(s): 232e081

Update llm/llamacpp/lc_model.py

Browse files
Files changed (1) hide show
  1. 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
- path_to_models = os.path.join(os.getcwd(), "/llm/models")
31
- print(path_to_models)
 
 
32
 
33
- path_to_prompts = os.path.join(os.getcwd(), "/llm/")
34
- print(path_to_prompts)
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):