process_image
Browse files
app.py
CHANGED
|
@@ -293,8 +293,9 @@ description = """<h3>Sherif's Demo for table extraction with the Table Transform
|
|
| 293 |
</ul>
|
| 294 |
"""
|
| 295 |
|
| 296 |
-
|
| 297 |
-
|
|
|
|
| 298 |
outputs=[gr.Image(type="pil", label="Detected table"), gr.Dataframe(label="Table as CSV"), gr.JSON(label="Data as JSON")],
|
| 299 |
title=title,
|
| 300 |
description=description)
|
|
|
|
| 293 |
</ul>
|
| 294 |
"""
|
| 295 |
|
| 296 |
+
# inputs=[gr.Interface(file_types=['.pdf'], label="Upload a PDF file"), gr.Image(type="pil", label="Or upload an image file to perform OCR directly")],
|
| 297 |
+
app = gr.Interface(fn=process_image,
|
| 298 |
+
inputs=gr.Image(type="pil"),
|
| 299 |
outputs=[gr.Image(type="pil", label="Detected table"), gr.Dataframe(label="Table as CSV"), gr.JSON(label="Data as JSON")],
|
| 300 |
title=title,
|
| 301 |
description=description)
|