stanimirovb's picture
scale 1
214724d verified
raw
history blame
340 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(scale=1, image_mode='P'),
outputs=gr.Label(),
)
iface.launch()