Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from infer_onnx import infer_onnx | |
| def predict_from_image(image): | |
| image.save("uploaded.png") | |
| prediction = infer_onnx("model.onnx", "uploaded.png") | |
| return prediction | |
| iface = gr.Interface( | |
| fn=predict_from_image, | |
| inputs=gr.Image(type="pil"), | |
| outputs="text", | |
| title="ONNX CAPTCHA Inference", | |
| description="Upload an image to get prediction from ONNX model." | |
| ) | |
| if __name__ == "__main__": | |
| iface.launch() | |