Spaces:
Runtime error
Runtime error
import gradio as gr | |
def main(N, Hin, Win, kernel_size, stride, padding, dilation): | |
Hout = int (((Hin + 2*padding - dilation*(kernel_size - 1) - 1)/stride) + 1) | |
Wout = int (((Win + 2*padding - dilation*(kernel_size - 1) - 1)/stride) + 1) | |
if Hout > 0 and Wout > 0: | |
return f"[{N}, Cout, {Hout}, {Wout}]" | |
return "Error" | |
iface = gr.Interface( | |
fn=main, | |
inputs=[*(gr.inputs.Slider(0, 2048, default=1) for i in range(3)), *[gr.inputs.Slider(0, 50, default=1, step=1) for i in range(4)]], | |
outputs=["text"], | |
live=True, | |
allow_screenshot=False, | |
allow_flagging=False) | |
iface.launch() |