ysharma HF staff commited on
Commit
715f449
1 Parent(s): 18c67b8
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,13 +1,15 @@
1
  import gradio as gr
2
 
3
- def wordsrch(img, lang):
 
4
  ocrimg = gr.Interface.load("spaces/PaddlePaddle/PaddleOCR")(img, lang)
5
  return ocrimg
6
 
7
- examples = [["wordsearch2.jpg","en"]]
 
8
 
9
  iface = gr.Interface(fn=wordsrch,
10
- inputs=[gr.inputs.Image(type='filetype', label='Input'), "en"],
11
  outputs=gr.outputs.Image(type='file', label='Output'),
12
  examples = examples)
13
  iface.launch(debug=True, enable_queue=True)
 
1
  import gradio as gr
2
 
3
+ def wordsrch(img):
4
+ lang = "en"
5
  ocrimg = gr.Interface.load("spaces/PaddlePaddle/PaddleOCR")(img, lang)
6
  return ocrimg
7
 
8
+ #examples = [["wordsearch2.jpg","en"]]
9
+ examples = ["wordsearch2.jpg"]
10
 
11
  iface = gr.Interface(fn=wordsrch,
12
+ inputs=gr.inputs.Image(type='filetype', label='Input'), #"en"],
13
  outputs=gr.outputs.Image(type='file', label='Output'),
14
  examples = examples)
15
  iface.launch(debug=True, enable_queue=True)