gitio-app / demo.yaml
lint's picture
Upload folder using huggingface_hub
265bbed
raw
history blame
1.01 kB
lite_metadata:
gradio_version: 3.32.0
liteobj_version: 0.0.7
class_string: gradio.interface.Interface
kwargs:
title: Gradio Webapp
description: Given a pil image apply glitch to it
article: null
thumbnail: null
theme: gradio/seafoam
css: null
allow_flagging: never
inputs:
- class_string: gradio.components.Image
kwargs:
label: image
type: pil
outputs:
- class_string: gradio.components.Image
kwargs:
label: output
type: pil
fn:
class_string: gradify.gradify_closure
kwargs:
argmaps:
- label: image
postprocessing: null
func_kwargs: {}
source: "from PIL import Image\nimport random\n\n\ndef apply_glitch(image):\n\
\ pixels = image.load()\n width, height = image.size\n for i in range(width):\n\
\ for j in range(height):\n r, g, b = pixels[i, j]\n \
\ if random.random() < 0.05:\n pixels[i, j] = g, b,\
\ r\n return image\n"