commit
ce646f7a3f
|
@ -1,15 +1,14 @@
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
SRC_DIR = Path(__file__).parent
|
|
||||||
|
|
||||||
def load_prompt():
|
def load_prompt():
|
||||||
try:
|
try:
|
||||||
# get directory of this file:
|
# get directory of this file:
|
||||||
file_dir = Path(os.path.dirname(os.path.realpath(__file__)))
|
file_dir = Path(__file__).parent
|
||||||
data_dir = file_dir / "data"
|
prompt_file_path = file_dir / "data" / "prompt.txt"
|
||||||
prompt_file = data_dir / "prompt.txt"
|
|
||||||
# Load the promt from data/prompt.txt
|
# Load the prompt from data/prompt.txt
|
||||||
with open(SRC_DIR/ "data/prompt.txt", "r") as prompt_file:
|
with open(prompt_file_path, "r") as prompt_file:
|
||||||
prompt = prompt_file.read()
|
prompt = prompt_file.read()
|
||||||
|
|
||||||
return prompt
|
return prompt
|
||||||
|
|
Loading…
Reference in New Issue