Gholamreza commited on
Commit
6bc1dcc
1 Parent(s): 43acda1

added app files

Browse files
Files changed (2) hide show
  1. app.py +13 -0
  2. requirements.txt +5 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import cv2
3
+
4
+ def process_image(input_image):
5
+ # Convert the image to grayscale
6
+ gray_image = cv2.cvtColor(input_image, cv2.COLOR_BGR2GRAY)
7
+
8
+ return gray_image
9
+
10
+ iface = gr.Interface(fn=process_image, inputs="image", outputs="image",
11
+ examples=[[cv2.imread('img.jpg')]])
12
+ iface.launch()
13
+
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ opencv-python
2
+ numba
3
+ numpy
4
+ matplotlib
5
+