photo_filter / app.py
RIZAEFE's picture
Update app.py
747ecc4 verified
raw
history blame contribute delete
629 Bytes
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)