Spaces:
Running
on
Zero
Running
on
Zero
Update HTML
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import io
|
2 |
from typing import Any, List, Union
|
3 |
|
|
|
|
|
4 |
import cv2
|
5 |
import gradio as gr
|
6 |
import matplotlib.pyplot as plt
|
@@ -185,10 +187,29 @@ def analyze_page(
|
|
185 |
|
186 |
|
187 |
with gr.Blocks(fill_height=True) as demo:
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
with gr.Row():
|
193 |
with gr.Column(scale=1):
|
194 |
upload = gr.File(label="Upload File [JPG | PNG | PDF]", file_types=["pdf", "jpg", "png"])
|
|
|
1 |
import io
|
2 |
from typing import Any, List, Union
|
3 |
|
4 |
+
from networkx import center
|
5 |
+
|
6 |
import cv2
|
7 |
import gradio as gr
|
8 |
import matplotlib.pyplot as plt
|
|
|
187 |
|
188 |
|
189 |
with gr.Blocks(fill_height=True) as demo:
|
190 |
+
gr.Markdown(
|
191 |
+
"""
|
192 |
+
<p align="center">
|
193 |
+
<img src="https://github.com/felixdittrich92/OnnxTR/raw/main/docs/images/logo.jpg" width="15%">
|
194 |
+
</p>
|
195 |
+
|
196 |
+
<div align="center">
|
197 |
+
|
198 |
+
# OnnxTR OCR Demo
|
199 |
+
|
200 |
+
[![GitHub OnnxTR](https://img.shields.io/badge/GitHub-blue?logo=github)](https://github.com/felixdittrich92/OnnxTR)
|
201 |
+
|
202 |
+
[![PyPI](https://img.shields.io/pypi/v/onnxtr?color=blue)](https://pypi.org/project/onnxtr/)
|
203 |
+
|
204 |
+
</div>
|
205 |
+
|
206 |
+
## To use this interactive demo for OnnxTR:
|
207 |
+
|
208 |
+
### 1. Upload a document (PDF, JPG, or PNG)
|
209 |
+
### 2. Select the model architectures for text detection and recognition you want to use
|
210 |
+
### 3. Press the "Analyze page" button to process the uploaded document
|
211 |
+
"""
|
212 |
+
)
|
213 |
with gr.Row():
|
214 |
with gr.Column(scale=1):
|
215 |
upload = gr.File(label="Upload File [JPG | PNG | PDF]", file_types=["pdf", "jpg", "png"])
|