File size: 476 Bytes
a5f0fd1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
def process_document(image):
extracted_text = extract_text(image)
structured_text = structure_text(extracted_text)
return extracted_text, structured_text
iface = gr.Interface(
fn=process_document,
inputs="image",
outputs=["text", "text"],
title="TransformoDocs - AI Document Processor",
description="Upload a document, and AI will extract and structure the text.",
)
iface.launch(share=True) # Enables a public demo link
|