gitio-app / demo.yaml
lint's picture
Upload folder using huggingface_hub
50ba3b6
raw
history blame
1.24 kB
lite_metadata:
gradio_version: 3.32.0
class_string: gradio.interface.Interface
kwargs:
title: Gradio Webapp
description: given a PIL image, convert to anime
article: null
thumbnail: null
theme: gradio/seafoam
css: null
allow_flagging: never
inputs:
class_string: liteobj.listify
args:
- class_string: gradio.components.Image
kwargs:
label: image
type: pil
outputs:
class_string: liteobj.listify
args:
- class_string: gradio.components.Image
kwargs:
label: output
type: pil
fn:
class_string: gradify.gradify_closure
kwargs:
argmaps:
class_string: liteobj.listify
args:
- label: image
postprocessing: null
func_kwargs: {}
ldict:
class_string: gradify.exec_to_dict
kwargs:
source: "from PIL import Image\nimport numpy as np\n\n\ndef convert_to_anime(image):\n\
\ img = np.array(image)\n r, g, b = img[:, :, 0], img[:, :, 1],\
\ img[:, :, 2]\n gray = 0.2989 * r + 0.587 * g + 0.114 * b\n gray\
\ = gray.astype(np.uint8)\n gray = np.stack([gray, gray, gray], axis=2)\n\
\ return Image.fromarray(gray)\n"