annas4421 commited on
Commit
15e8427
·
verified ·
1 Parent(s): 2651156

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
 
 
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 = """