Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Changed gradio layout to default
Browse files
app.py
CHANGED
@@ -36,18 +36,12 @@ def predict_matricula(model, task_name, image):
|
|
36 |
|
37 |
import gradio as gr
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
""
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
with gr.Row():
|
49 |
-
output_json=gr.JSON(label="Matricula JSON", show_label=True, value={})
|
50 |
-
submit_btn = gr.Button("Submit")
|
51 |
-
submit_btn.click(fn=fn_predict, inputs=[input_image], outputs=[output_json])
|
52 |
-
|
53 |
-
demo.launch(share=True)
|
|
|
36 |
|
37 |
import gradio as gr
|
38 |
|
39 |
+
demo = gr.Interface(
|
40 |
+
fn=lambda x:predict_matricula(model, task_name="matricula", image=x),
|
41 |
+
title="Demo: Donut 🍩 for DR Matriculas",
|
42 |
+
description="Dominican Vehicle **Matriculas OCR** Infering",
|
43 |
+
inputs=gr.Image(label="Matricula", sources="upload", type="pil", show_label=True),
|
44 |
+
outputs=[gr.JSON(label="Matricula JSON", show_label=True, value={})]
|
45 |
+
)
|
46 |
+
|
47 |
+
demo.launch(share=True)
|
|
|
|
|
|
|
|
|
|
|
|