Biifruu commited on
Commit
585ccbb
·
verified ·
1 Parent(s): e9e0811

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -109,12 +109,13 @@ def process_file(file):
109
  all_crops.append(crop)
110
  return all_crops if all_crops else [Image.new("RGB", (300, 100), color=(255, 0, 0))]
111
 
 
112
  demo = gr.Interface(
113
  fn=process_file,
114
- inputs=gr.File(label="Sube un PDF o imagen", file_types=[".pdf", ".jpg", ".png"]),
115
- outputs=gr.Gallery(label="Imágenes detectadas", columns=3, height="auto", object_fit="contain"),
116
- title="Detector de Imágenes Embebidas con OCR (Filtrado estricto)",
117
- description="Extrae solo los recortes de imagen de documentos escaneados, descartando aquellos que contienen mucho texto."
118
  )
119
 
120
  demo.launch()
 
109
  all_crops.append(crop)
110
  return all_crops if all_crops else [Image.new("RGB", (300, 100), color=(255, 0, 0))]
111
 
112
+ # English Gradio Interface
113
  demo = gr.Interface(
114
  fn=process_file,
115
+ inputs=gr.File(label="Upload a PDF or image", file_types=[".pdf", ".jpg", ".png"]),
116
+ outputs=gr.Gallery(label="Detected Images", columns=3, height="auto", object_fit="contain"),
117
+ title="Embedded Image Extractor",
118
+ description="Extracts only the image regions from scanned documents, filtering out areas with significant text content."
119
  )
120
 
121
  demo.launch()