shimer56 commited on
Commit
07216f8
1 Parent(s): 409e708

Upload folder using huggingface_hub

Browse files
extract_images/input_docs/uploaded_pdf.pdf CHANGED
Binary files a/extract_images/input_docs/uploaded_pdf.pdf and b/extract_images/input_docs/uploaded_pdf.pdf differ
 
extract_images/services.py CHANGED
@@ -137,6 +137,7 @@ def extract_images_gpt(model, pdf_file):
137
  "https://api.openai.com/v1/chat/completions", headers=headers, json=payload
138
  )
139
  response_json = response.json()
 
140
 
141
  if "choices" in response_json and len(response_json["choices"]) > 0:
142
  extracted_images.append(
 
137
  "https://api.openai.com/v1/chat/completions", headers=headers, json=payload
138
  )
139
  response_json = response.json()
140
+ print(response_json["choices"][0]["message"]["content"])
141
 
142
  if "choices" in response_json and len(response_json["choices"]) > 0:
143
  extracted_images.append(
extract_tables/services.py CHANGED
@@ -179,6 +179,7 @@ def extract_tables_gpt(model, pdf_file):
179
  "https://api.openai.com/v1/chat/completions", headers=headers, json=payload
180
  )
181
  response_json = response.json()
 
182
 
183
  if "choices" in response_json and len(response_json["choices"]) > 0:
184
  extracted_tables.append(
 
179
  "https://api.openai.com/v1/chat/completions", headers=headers, json=payload
180
  )
181
  response_json = response.json()
182
+ print(response_json["choices"][0]["message"]["content"])
183
 
184
  if "choices" in response_json and len(response_json["choices"]) > 0:
185
  extracted_tables.append(