rishiraj commited on
Commit
ecddc77
1 Parent(s): d0c9c37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +47 -1
app.py CHANGED
@@ -71,7 +71,7 @@ with gr.Blocks(title="PDF data extraction with Marker & Indexify") as marker_dem
71
  gr.HTML("<h1 style='text-align: center'>PDF data extraction with Marker & <a href='https://getindexify.ai/'>Indexify</a></h1>")
72
  gr.HTML("<p style='text-align: center'>Indexify is a scalable realtime and continuous indexing and structured extraction engine for unstructured data to build generative AI applications</p>")
73
  gr.HTML("<h3 style='text-align: center'>If you like this demo, please ⭐ Star us on <a href='https://github.com/tensorlakeai/indexify' target='_blank'>GitHub</a>!</h3>")
74
- gr.HTML("<h4 style='text-align: center'>Here's an example notebook that demonstrates how to build a continous <a href='https://github.com/tensorlakeai/indexify/blob/main/docs/docs/examples/SEC_10_K_docs.ipynb' target='_blank'>extraction pipleine</a> with Indexify</h4>")
75
 
76
  with gr.Row():
77
  with gr.Column():
@@ -113,6 +113,52 @@ with gr.Blocks(title="PDF data extraction with Marker & Indexify") as marker_dem
113
  outputs = [model_output_text_box]
114
  )
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  demo = gr.TabbedInterface([marker_demo, pdf_demo, gemini_demo, openai_demo], ["Marker Extractor", "PDF Extractor", "Gemini Extractor", "OpenAI Extractor"], theme=gr.themes.Soft())
117
 
118
  demo.queue()
 
71
  gr.HTML("<h1 style='text-align: center'>PDF data extraction with Marker & <a href='https://getindexify.ai/'>Indexify</a></h1>")
72
  gr.HTML("<p style='text-align: center'>Indexify is a scalable realtime and continuous indexing and structured extraction engine for unstructured data to build generative AI applications</p>")
73
  gr.HTML("<h3 style='text-align: center'>If you like this demo, please ⭐ Star us on <a href='https://github.com/tensorlakeai/indexify' target='_blank'>GitHub</a>!</h3>")
74
+ gr.HTML("<h4 style='text-align: center'>Here's an example notebook that demonstrates how to build a continous <a href='https://github.com/tensorlakeai/indexify/blob/main/docs/docs/examples/efficient_rag.ipynb' target='_blank'>extraction pipleine</a> with Indexify</h4>")
75
 
76
  with gr.Row():
77
  with gr.Column():
 
113
  outputs = [model_output_text_box]
114
  )
115
 
116
+ with gr.Blocks(title="PDF data extraction with PDF Extractor & Indexify") as pdf_demo:
117
+ gr.HTML("<h1 style='text-align: center'>PDF data extraction with PDF Extractor & <a href='https://getindexify.ai/'>Indexify</a></h1>")
118
+ gr.HTML("<p style='text-align: center'>Indexify is a scalable realtime and continuous indexing and structured extraction engine for unstructured data to build generative AI applications</p>")
119
+ gr.HTML("<h3 style='text-align: center'>If you like this demo, please ⭐ Star us on <a href='https://github.com/tensorlakeai/indexify' target='_blank'>GitHub</a>!</h3>")
120
+ gr.HTML("<h4 style='text-align: center'>Here's an example notebook that demonstrates how to build a continous <a href='https://github.com/tensorlakeai/indexify/blob/main/docs/docs/examples/SEC_10_K_docs.ipynb' target='_blank'>extraction pipleine</a> with Indexify</h4>")
121
+
122
+ with gr.Row():
123
+ with gr.Column():
124
+ gr.HTML(
125
+ "<p><b>Step 1:</b> Upload a PDF file from local storage.</p>"
126
+
127
+ "<p style='color: #A0A0A0;'>Use this demo for single PDF file only. "
128
+ "You can extract from PDF files continuously and try various other extractors locally with "
129
+ "<a href='https://getindexify.ai/'>Indexify</a>.</p>"
130
+ )
131
+
132
+ pdf_file = gr.File(type="filepath")
133
+
134
+ with gr.Column():
135
+ gr.HTML("<p><b>Step 2:</b> Run the extractor.</p>")
136
+
137
+ go_button = gr.Button(
138
+ value="Run extractor",
139
+ variant="primary",
140
+ )
141
+
142
+ model_output_text_box = gr.Textbox(
143
+ label="Extractor Output",
144
+ elem_id="model_output_text_box",
145
+ )
146
+
147
+ with gr.Row():
148
+
149
+ gr.HTML(
150
+ "<p style='text-align: center'>"
151
+ "Developed with 🫶 by <a href='https://getindexify.ai/' target='_blank'>Indexify</a> | "
152
+ "a <a href='https://www.tensorlake.ai/' target='_blank'>Tensorlake</a> product"
153
+ "</p>"
154
+ )
155
+
156
+ go_button.click(
157
+ fn=use_pdf_extractor,
158
+ inputs = [pdf_file],
159
+ outputs = [model_output_text_box]
160
+ )
161
+
162
  demo = gr.TabbedInterface([marker_demo, pdf_demo, gemini_demo, openai_demo], ["Marker Extractor", "PDF Extractor", "Gemini Extractor", "OpenAI Extractor"], theme=gr.themes.Soft())
163
 
164
  demo.queue()