Skip to content

Commit

Permalink
Merge pull request Significant-Gravitas#50 from tomviner/fix-prompt-path
Browse files Browse the repository at this point in the history
don't depend on the path script is run from
  • Loading branch information
Torantulino authored Apr 4, 2023
2 parents 3088050 + 4d4ff65 commit 37f8466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
from pathlib import Path

SRC_DIR = Path(__file__).parent

def load_prompt():
try:
Expand All @@ -9,7 +9,7 @@ def load_prompt():
data_dir = file_dir / "data"
prompt_file = data_dir / "prompt.txt"
# Load the promt from data/prompt.txt
with open(prompt_file, "r") as prompt_file:
with open(SRC_DIR/ "data/prompt.txt", "r") as prompt_file:
prompt = prompt_file.read()

return prompt
Expand Down

0 comments on commit 37f8466

Please sign in to comment.