cxeep commited on
Commit
fa68695
·
1 Parent(s): f00f3d6

align latest gradio

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -29,7 +29,7 @@ description = 'Gradio demo for PaddleOCR. PaddleOCR demo supports Chinese, Engli
29
  article = "<p style='text-align: center'><a href='https://www.paddlepaddle.org.cn/hub/scene/ocr'>Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)</a> | <a href='https://github.com/PaddlePaddle/PaddleOCR'>Github Repo</a></p>"
30
  examples = [['example.jpg','en']]
31
  css = ".output_image, .input_image {height: 40rem !important; width: 100% !important;}"
32
- gr.Interface(
33
  inference,
34
  [gr.Image(type='filepath', label='Input'),gr.Dropdown(choices=['ch', 'en', 'fr', 'german', 'korean', 'japan', 'ar'], type="value", value='ch', label='language')],
35
  # gr.outputs.Image(type='file', label='Output'),
@@ -39,5 +39,7 @@ gr.Interface(
39
  article=article,
40
  examples=examples,
41
  css=css,
42
- enable_queue=True
43
- ).launch(debug=True)
 
 
 
29
  article = "<p style='text-align: center'><a href='https://www.paddlepaddle.org.cn/hub/scene/ocr'>Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)</a> | <a href='https://github.com/PaddlePaddle/PaddleOCR'>Github Repo</a></p>"
30
  examples = [['example.jpg','en']]
31
  css = ".output_image, .input_image {height: 40rem !important; width: 100% !important;}"
32
+ app = gr.Interface(
33
  inference,
34
  [gr.Image(type='filepath', label='Input'),gr.Dropdown(choices=['ch', 'en', 'fr', 'german', 'korean', 'japan', 'ar'], type="value", value='ch', label='language')],
35
  # gr.outputs.Image(type='file', label='Output'),
 
39
  article=article,
40
  examples=examples,
41
  css=css,
42
+ # enable_queue=True
43
+ )
44
+ app.queue(max_size=10)
45
+ app.launch(debug=True)