Felix92 commited on
Commit
b4b383e
·
1 Parent(s): 345e261

Update HTML

Browse files
Files changed (1) hide show
  1. app.py +25 -4
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
- #gr.Image("/file=data/logo.jpg", height=400, label=None, show_label=False, show_download_button=False)
189
- gr.HTML("<h1>OnnxTR OCR Demo</h1>")
190
- gr.HTML("<h2>GitHub: <a href='https://github.com/felixdittrich92/OnnxTR'>OnnxTR</a></h2>")
191
- gr.HTML("</div>")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"])