Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -285,9 +285,9 @@ def generate_video(model_name: str, text: str, video_path: str,
|
|
| 285 |
|
| 286 |
# Define examples for image and video inference
|
| 287 |
image_examples = [
|
| 288 |
-
["
|
| 289 |
-
["
|
| 290 |
-
["
|
| 291 |
]
|
| 292 |
|
| 293 |
video_examples = [
|
|
@@ -307,7 +307,7 @@ css = """
|
|
| 307 |
|
| 308 |
# Create the Gradio Interface
|
| 309 |
with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
| 310 |
-
gr.Markdown("# **[
|
| 311 |
with gr.Row():
|
| 312 |
with gr.Column():
|
| 313 |
with gr.Tabs():
|
|
@@ -317,7 +317,7 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
| 317 |
image_submit = gr.Button("Submit", elem_classes="submit-btn")
|
| 318 |
gr.Examples(
|
| 319 |
examples=image_examples,
|
| 320 |
-
inputs=[image_query, image_upload]
|
| 321 |
)
|
| 322 |
with gr.TabItem("Video Inference"):
|
| 323 |
video_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
|
|
@@ -336,7 +336,7 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
| 336 |
with gr.Column():
|
| 337 |
output = gr.Textbox(label="Output", interactive=False, lines=3, scale=2)
|
| 338 |
model_choice = gr.Radio(
|
| 339 |
-
choices=["Nanonets-OCR-s", "
|
| 340 |
label="Select Model",
|
| 341 |
value="Nanonets-OCR-s"
|
| 342 |
)
|
|
|
|
| 285 |
|
| 286 |
# Define examples for image and video inference
|
| 287 |
image_examples = [
|
| 288 |
+
["Convert this page to docling", "images/1.png", "SmolDocling-256M-preview"],
|
| 289 |
+
["OCR the image", "images/2.jpeg"],
|
| 290 |
+
["Convert this page to docling", "images/3.png", "SmolDocling-256M-preview"],
|
| 291 |
]
|
| 292 |
|
| 293 |
video_examples = [
|
|
|
|
| 307 |
|
| 308 |
# Create the Gradio Interface
|
| 309 |
with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
| 310 |
+
gr.Markdown("# **[OCR Net 4x](https://huggingface.co/collections/prithivMLmods/core-and-docscope-ocr-models-6816d7f1bde3f911c6c852bc)**")
|
| 311 |
with gr.Row():
|
| 312 |
with gr.Column():
|
| 313 |
with gr.Tabs():
|
|
|
|
| 317 |
image_submit = gr.Button("Submit", elem_classes="submit-btn")
|
| 318 |
gr.Examples(
|
| 319 |
examples=image_examples,
|
| 320 |
+
inputs=[image_query, image_upload, model_choice]
|
| 321 |
)
|
| 322 |
with gr.TabItem("Video Inference"):
|
| 323 |
video_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
|
|
|
|
| 336 |
with gr.Column():
|
| 337 |
output = gr.Textbox(label="Output", interactive=False, lines=3, scale=2)
|
| 338 |
model_choice = gr.Radio(
|
| 339 |
+
choices=["Nanonets-OCR-s", "SmolDocling-256M-preview", "MonkeyOCR-Recognition"],
|
| 340 |
label="Select Model",
|
| 341 |
value="Nanonets-OCR-s"
|
| 342 |
)
|