SujanMidatani commited on
Commit
8aba350
1 Parent(s): d8aec0e

update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -5,8 +5,10 @@ from kor import create_extraction_chain, Object, Text
5
  from langchain.prompts.prompt import PromptTemplate
6
  from langchain.chains import LLMChain
7
  from langchain.llms import OpenAI
8
- import os
9
- os.environ['OPENAI_API_KEY']="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"
 
 
10
  def gen_text(pdf_file):
11
  with open(pdf_file.name, "rb") as f:
12
  reader = PdfReader(f)
 
5
  from langchain.prompts.prompt import PromptTemplate
6
  from langchain.chains import LLMChain
7
  from langchain.llms import OpenAI
8
+
9
+ from dotenv import load_dotenv
10
+
11
+ load_dotenv()
12
  def gen_text(pdf_file):
13
  with open(pdf_file.name, "rb") as f:
14
  reader = PdfReader(f)