File size: 586 Bytes
eab34ad 15364a8 a4409f2 15364a8 a4409f2 15364a8 eab34ad 15364a8 a4409f2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio
import cv2
def inference(img, in_bright, in_contrast):
new_img = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
in_bright=1
in_contrast=50
return new_img
# For information on Interfaces, head to https://gradio.app/docs/
# For user guides, head to https://gradio.app/guides/
# For Spaces usage, head to https://huggingface.co/docs/hub/spaces
iface = gradio.Interface(
fn=inference,
inputs=['image',gradio.Slider(0,100),gradio.Slider(0,100)],
outputs='image',
title='Change Image',
description='Interface!',
examples=["llama.jpg"])
iface.launch()
|