Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,9 @@ from langchain.document_loaders import PyPDFLoader, Docx2txtLoader, TextLoader,
|
|
12 |
|
13 |
# Load environment variables from .env
|
14 |
load_dotenv()
|
15 |
-
|
|
|
|
|
16 |
|
17 |
# Custom template to guide the LLM
|
18 |
custom_template = """
|
|
|
12 |
|
13 |
# Load environment variables from .env
|
14 |
load_dotenv()
|
15 |
+
from openai import OpenAI
|
16 |
+
api_key = os.getenv("OPENAI_API_KEY")
|
17 |
+
client = OpenAI(api_key=api_key)
|
18 |
|
19 |
# Custom template to guide the LLM
|
20 |
custom_template = """
|