rushic24 commited on
Commit
17ad061
1 Parent(s): 9a77ca7

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def main(N, Hin, Win, kernel_size, stride, padding, dilation):
4
+ Hout = int (((Hin + 2*padding - dilation*(kernel_size - 1) - 1)/stride) + 1)
5
+ Wout = int (((Win + 2*padding - dilation*(kernel_size - 1) - 1)/stride) + 1)
6
+
7
+ if Hout > 0 and Wout > 0:
8
+ return f"[{N}, Cout, {Hout}, {Wout}]"
9
+ return "Error"
10
+
11
+ iface = gr.Interface(
12
+ fn=main,
13
+ inputs=[gr.inputs.Slider(0, 2048, default=1) for i in range(7)],
14
+ outputs=["text"],
15
+ live=True,
16
+ allow_screenshot=False,
17
+ allow_flagging=False)
18
+
19
+ iface.launch()