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 | |