File size: 635 Bytes
fade72c
 
 
 
 
346511e
 
 
 
fade72c
 
 
346511e
fade72c
346511e
 
fade72c
346511e
 
 
 
c4727a3
346511e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import cv2 as cv
import numpy as np
import gradio as gr

def nostalji(image):
    image=np.array(image)
    gray_image=cv.cvtColor(image,cv.COLOR_BGR2GRAY)
    return gray_image
#£gradio ara yüzünü oluşturma 

with gr.Blocks() as demo:
    gr.Markdown("# Nostalji")
    gr.Markdown("## Görsel yükleyin ve gri tona çevirsin")

    image_input=gr.Image(type='pil',label="Görsel")
    image_output=gr.Image(type='numpy',label="Gri Görsel")

    btn=gr.Button("Nostalji")
    btn.click(fn=nostalji,
              inputs=image_input,
              outputs=image_output)
    if __name__=="__main__":
        demo.launch(share=True)