stanimirovb's picture
w/h
bf726bf verified
raw
history blame
354 Bytes
import gradio as gr
import numpy as np
def on_submit(img):
img = img['composite']
print(img.shape)
print(img.dtype)
print(img[:3, :3])
return f"Sum: {np.sum(img)}"
iface = gr.Interface(
title = "LeNet",
fn = on_submit,
inputs=gr.Sketchpad(width=280, height=280, image_mode='P'),
outputs=gr.Label(),
)
iface.launch()