Update data.py

Just import path from OS library.
pull/33/head
Andres Caicedo 2023-04-04 11:30:20 +02:00
parent 8053ecd5c6
commit 1632f7ebf6
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import os from os import path
from pathlib import Path from pathlib import Path
@ -6,7 +6,7 @@ def load_prompt():
"""Load the prompt from data/prompt.txt""" """Load the prompt from data/prompt.txt"""
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(path.dirname(path.realpath(__file__)))
data_dir = file_dir / "data" data_dir = file_dir / "data"
prompt_file = data_dir / "prompt.txt" prompt_file = data_dir / "prompt.txt"
# Load the promt from data/prompt.txt # Load the promt from data/prompt.txt