soutrik commited on
Commit
8d60634
1 Parent(s): 20b2839

added: basic app

Browse files
__pycache__/app.cpython-310.pyc ADDED
Binary file (495 Bytes). View file
 
__pycache__/model.cpython-310.pyc ADDED
Binary file (450 Bytes). View file
 
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ from model import inverse_pic
4
+
5
+ demo = gr.Interface(
6
+ inverse_pic,
7
+ gr.Image(show_label=True, label="Input Image"),
8
+ "image",
9
+ title="Image Transposer",
10
+ description="Transpose Image",
11
+ )
12
+
13
+ if __name__ == "__main__":
14
+ demo.launch()
model.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import cv2
2
+ import numpy as np
3
+
4
+
5
+ def inverse_pic(input_img):
6
+ # print(type(input_img))
7
+ input_img = cv2.cvtColor(input_img, cv2.COLOR_BGR2RGB)
8
+ return np.flip(input_img)
requirements.txt CHANGED
@@ -5,4 +5,5 @@ grad-cam
5
  pillow
6
  numpy
7
  pytorch_lightning
8
- cv2
 
 
5
  pillow
6
  numpy
7
  pytorch_lightning
8
+ cv2
9
+ gradio