DeepDiveDev commited on
Commit
a5f0fd1
·
verified ·
1 Parent(s): 302336c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def process_document(image):
4
+ extracted_text = extract_text(image)
5
+ structured_text = structure_text(extracted_text)
6
+ return extracted_text, structured_text
7
+
8
+ iface = gr.Interface(
9
+ fn=process_document,
10
+ inputs="image",
11
+ outputs=["text", "text"],
12
+ title="TransformoDocs - AI Document Processor",
13
+ description="Upload a document, and AI will extract and structure the text.",
14
+ )
15
+ iface.launch(share=True) # Enables a public demo link