Lavi melis commited on
Commit
04761ad
·
verified ·
1 Parent(s): ff84369

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import numpy as np
3
+ import cv2 as cv
4
+
5
+ def convert_img_gry(image):
6
+ gray_img=cv.cvtColor(image,cv.COLOR_BGR2GRAY)
7
+ return gray_img
8
+
9
+ #Gradio arayüzü oluştur
10
+ interface=gr.Interface(
11
+ fn=convert_img_gry,
12
+ inputs=gr.Image(type="numpy"),
13
+ outputs="image",
14
+ title="Gri Tonlamalı Resme Dönüştür",
15
+ description="Bir görüntü yükleyin ve onu siyah beyaza çevirin"
16
+ )
17
+
18
+ #Uygulamayı çalıştır
19
+ if __name__== "__main__":
20
+ interface.launch(share=True)