Upload folder using huggingface_hub
Browse files
demo.yaml
CHANGED
@@ -4,27 +4,31 @@ lite_metadata:
|
|
4 |
class_string: gradio.interface.Interface
|
5 |
kwargs:
|
6 |
title: Gradio Webapp
|
7 |
-
description:
|
8 |
article: null
|
9 |
thumbnail: null
|
10 |
theme: gradio/seafoam
|
11 |
css: null
|
12 |
allow_flagging: never
|
13 |
inputs:
|
14 |
-
- class_string: gradio.components.
|
15 |
kwargs:
|
16 |
-
label:
|
17 |
-
type:
|
18 |
outputs:
|
19 |
-
- class_string: gradio.components.
|
20 |
kwargs:
|
21 |
label: output
|
|
|
22 |
fn:
|
23 |
class_string: gradify.gradify_closure
|
24 |
kwargs:
|
25 |
argmaps:
|
26 |
-
- label:
|
27 |
-
postprocessing:
|
28 |
func_kwargs: {}
|
29 |
-
source: "
|
30 |
-
\
|
|
|
|
|
|
|
|
4 |
class_string: gradio.interface.Interface
|
5 |
kwargs:
|
6 |
title: Gradio Webapp
|
7 |
+
description: Given a pil image apply glitch to it
|
8 |
article: null
|
9 |
thumbnail: null
|
10 |
theme: gradio/seafoam
|
11 |
css: null
|
12 |
allow_flagging: never
|
13 |
inputs:
|
14 |
+
- class_string: gradio.components.Image
|
15 |
kwargs:
|
16 |
+
label: image
|
17 |
+
type: pil
|
18 |
outputs:
|
19 |
+
- class_string: gradio.components.Image
|
20 |
kwargs:
|
21 |
label: output
|
22 |
+
type: pil
|
23 |
fn:
|
24 |
class_string: gradify.gradify_closure
|
25 |
kwargs:
|
26 |
argmaps:
|
27 |
+
- label: image
|
28 |
+
postprocessing: null
|
29 |
func_kwargs: {}
|
30 |
+
source: "from PIL import Image\nimport random\n\n\ndef apply_glitch(image):\n\
|
31 |
+
\ pixels = image.load()\n width, height = image.size\n for i in range(width):\n\
|
32 |
+
\ for j in range(height):\n r, g, b = pixels[i, j]\n \
|
33 |
+
\ if random.random() < 0.05:\n pixels[i, j] = g, b,\
|
34 |
+
\ r\n return image\n"
|