shimer56 commited on
Commit
04e96c0
1 Parent(s): 2591f57

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. extract_images/services.py +2 -1
extract_images/services.py CHANGED
@@ -95,7 +95,8 @@ def extract_images_gemini(model, pdf_file):
95
 
96
 
97
  def extract_images_gpt(model, pdf_file):
98
- openai.api_key = OPENAI_API_KEY
 
99
  image_media_type = "image/png"
100
 
101
  pdf_path = "extract_images/input_docs/uploaded_pdf.pdf"
 
95
 
96
 
97
  def extract_images_gpt(model, pdf_file):
98
+ openai_api_key = os.getenv("OPENAI_API_KEY")
99
+ openai.api_key = openai_api_key
100
  image_media_type = "image/png"
101
 
102
  pdf_path = "extract_images/input_docs/uploaded_pdf.pdf"