sblumenf commited on
Commit
6992e9b
·
verified ·
1 Parent(s): 12e4f3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -40,11 +40,12 @@ def parse_pdf(pdf_file, output_format):
40
  markdown_output += f"\n![]({processed_image_url})"
41
  return markdown_output
42
  elif output_format == "HTML":
 
43
  html_output = f"<p>{text}</p>\n"
44
  for fig in figures:
45
- # Process each figure (e.g., embed image)
46
- # ... (Implement figure processing logic here)
47
- html_output += f"<img src='{processed_image_url}' alt='Figure'>" # Example for embedding image
48
  return html_output
49
 
50
  # Create the Gradio interface
 
40
  markdown_output += f"\n![]({processed_image_url})"
41
  return markdown_output
42
  elif output_format == "HTML":
43
+ processed_image_url = "" # Define outside the loop for HTML output
44
  html_output = f"<p>{text}</p>\n"
45
  for fig in figures:
46
+ # Process each figure (e.g., save as image)
47
+ processed_image_url = process_figure(fig)
48
+ html_output += f"<img src='{processed_image_url}' alt='Figure'>"
49
  return html_output
50
 
51
  # Create the Gradio interface