Onix4oDedy commited on
Commit
382c403
·
verified ·
1 Parent(s): b933a89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -82,11 +82,12 @@ def image_classifier(inp):
82
  return "Не загружена картинка"
83
  print('INPUT GOT>>>', inp)
84
  #gradio img inp - numpy ndarray
 
85
  img_byte_arr = io.BytesIO()
86
  inp.save(img_byte_arr, format='PNG')
87
  img_byte_arr = img_byte_arr.getvalue()
88
  result = solve_captcha(img_byte_arr)
89
  return result
90
- #gr.Image(type="pil"),
91
- demo = gr.Interface(fn=image_classifier, inputs=gr.Image(type="pil"), outputs="textbox")
92
- demo.launch(share=True,show_api = True)
 
82
  return "Не загружена картинка"
83
  print('INPUT GOT>>>', inp)
84
  #gradio img inp - numpy ndarray
85
+
86
  img_byte_arr = io.BytesIO()
87
  inp.save(img_byte_arr, format='PNG')
88
  img_byte_arr = img_byte_arr.getvalue()
89
  result = solve_captcha(img_byte_arr)
90
  return result
91
+ #inputs=gr.Image(type="pil")
92
+ demo = gr.Interface(fn=image_classifier, inputs="image", outputs="textbox")
93
+ demo.launch(share=True, show_api = True)