Update app.py
Browse files
app.py
CHANGED
@@ -184,13 +184,18 @@ def process_images(uploaded_file):
|
|
184 |
# Return HTML and the path to the CSV file
|
185 |
return html_output, temp_file.name
|
186 |
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
)
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
if __name__ == "__main__":
|
196 |
interface.launch()
|
|
|
184 |
# Return HTML and the path to the CSV file
|
185 |
return html_output, temp_file.name
|
186 |
|
187 |
+
with gr.Blocks() as interface:
|
188 |
+
with gr.Row():
|
189 |
+
gr.Markdown("# Document AI Translation")
|
190 |
+
gr.Markdown("Upload a ZIP file containing JPEG/JPG images, and the system will extract and translate text from each image.")
|
191 |
+
with gr.Row():
|
192 |
+
file_input = gr.File(label="Upload ZIP File")
|
193 |
+
with gr.Row():
|
194 |
+
html_output = gr.HTML()
|
195 |
+
with gr.Row():
|
196 |
+
file_output = gr.File()
|
197 |
+
|
198 |
+
file_input.change(process_images, inputs=file_input, outputs=[html_output, file_output])
|
199 |
|
200 |
if __name__ == "__main__":
|
201 |
interface.launch()
|