stanimirovb's picture
experiment
ba25596 verified
raw
history blame
331 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(image_mode='P'),
outputs=gr.Label(),
)
iface.launch()