Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
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 |
-
|
|
|
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"
|