mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 00:14:02 +00:00
Update app.py
Redirect PosixPath to WindowsPath on Windows.
This commit is contained in:
1 parent
6d249c78ff
commit
1104471b58
1 file changed
+7
@@ -9,6 +9,13 @@ from langchain import OpenAI
|
||||
from langchain.chains import VectorDBQAWithSourcesChain
|
||||
from langchain.prompts import PromptTemplate
|
||||
|
||||
# Redirect PosixPath to WindowsPath on Windows
|
||||
import platform
|
||||
if platform.system() == "Windows":
|
||||
import pathlib
|
||||
temp = pathlib.PosixPath
|
||||
pathlib.PosixPath = pathlib.WindowsPath
|
||||
|
||||
# loading the .env file
|
||||
dotenv.load_dotenv()
|
||||
|
||||
|
||||
Reference in new issue
Block a user