aksrad's picture
Update app.py
f1e35bd verified
raw
history blame contribute delete
382 Bytes
import gradio as gr
from PIL import Image
def convert_to_grayscale(input_path):
# Open the image file
img = Image.open(input_path)
# Convert the image to grayscale
return img.convert('L')
iface = gr.Interface (fn = convert_to_grayscale,
inputs= gr.Image (type='filepath'),
outputs= gr.Image())
iface.launch ()