Spaces:
Paused
Paused
add enable_queue
Browse files
app.py
CHANGED
|
@@ -52,15 +52,17 @@ def get_text(img_org):
|
|
| 52 |
|
| 53 |
transform,ort_session = initialize_model(model_file=model_file)
|
| 54 |
|
| 55 |
-
gr.Interface(
|
| 56 |
-
get_text,
|
| 57 |
inputs=gr.Image(type="pil"),
|
| 58 |
outputs=gr.Textbox(),
|
| 59 |
title="Text Captcha Reader",
|
| 60 |
-
examples=["8000.png","11JW29.png","2a8486.jpg","2nbcx.png",
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
)
|
|
|
|
|
|
|
| 64 |
|
| 65 |
# if __name__ == "__main__":
|
| 66 |
# image_path = "8000.png"
|
|
|
|
| 52 |
|
| 53 |
transform,ort_session = initialize_model(model_file=model_file)
|
| 54 |
|
| 55 |
+
iface = gr.Interface(
|
| 56 |
+
fn=get_text,
|
| 57 |
inputs=gr.Image(type="pil"),
|
| 58 |
outputs=gr.Textbox(),
|
| 59 |
title="Text Captcha Reader",
|
| 60 |
+
examples=["8000.png", "11JW29.png", "2a8486.jpg", "2nbcx.png",
|
| 61 |
+
"000679.png", "000HU.png", "00Uga.png.jpg", "00bAQwhAZU.jpg",
|
| 62 |
+
"00h57kYf.jpg", "0EoHdtVb.png", "0JS21.png", "0p98z.png", "10010.png"]
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
iface.launch(enable_queue=True)
|
| 66 |
|
| 67 |
# if __name__ == "__main__":
|
| 68 |
# image_path = "8000.png"
|