diff --git a/highlight_pdf.py b/highlight_pdf.py index 586decc..fb4a097 100644 --- a/highlight_pdf.py +++ b/highlight_pdf.py @@ -20,8 +20,14 @@ except LookupError: logging.info("Downloading 'punkt_tab' tokenizer data for NLTK.") nltk.download("punkt_tab") +# Get the directory of the current script +script_dir = os.path.dirname(os.path.abspath(__file__)) + +# Construct the absolute path to the prompts.yaml file +prompts_path = os.path.join(script_dir, 'prompts.yaml') + # Load prompts from configuration file -with open('prompts.yaml', 'r') as file: +with open(prompts_path, 'r') as file: prompts = yaml.safe_load(file) CUSTOM_SYSTEM_PROMPT = prompts['CUSTOM_SYSTEM_PROMPT'] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0735d59 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,29 @@ +aiofiles==24.1.0 +annotated-types==0.7.0 +anyio==4.6.0 +certifi==2024.8.30 +click==8.1.7 +distro==1.9.0 +exceptiongroup==1.2.2 +h11==0.14.0 +httpcore==1.0.6 +httpx==0.27.2 +idna==3.10 +jiter==0.6.0 +joblib==1.4.2 +nltk==3.9.1 +numpy==2.1.2 +ollama==0.3.3 +openai==1.51.1 +pydantic==2.9.2 +pydantic_core==2.23.4 +PyMuPDF==1.24.11 +python-dotenv==1.0.1 +PyYAML==6.0.2 +regex==2024.9.11 +scikit-learn==1.5.2 +scipy==1.14.1 +sniffio==1.3.1 +threadpoolctl==3.5.0 +tqdm==4.66.5 +typing_extensions==4.12.2