Upload folder using huggingface_hub
Browse files
demo.yaml
CHANGED
@@ -3,7 +3,7 @@ lite_metadata:
|
|
3 |
class_string: gradio.interface.Interface
|
4 |
kwargs:
|
5 |
title: Gradio Webapp
|
6 |
-
description: given
|
7 |
article: null
|
8 |
thumbnail: null
|
9 |
theme: gradio/seafoam
|
@@ -12,33 +12,31 @@ kwargs:
|
|
12 |
inputs:
|
13 |
class_string: liteobj.listify
|
14 |
args:
|
15 |
-
- class_string: gradio.components.
|
16 |
kwargs:
|
17 |
-
label:
|
18 |
-
|
19 |
-
- class_string: gradio.components.Number
|
20 |
-
kwargs:
|
21 |
-
label: num2
|
22 |
-
precision: 0
|
23 |
outputs:
|
24 |
class_string: liteobj.listify
|
25 |
args:
|
26 |
-
- class_string: gradio.components.
|
27 |
kwargs:
|
28 |
label: output
|
29 |
-
|
30 |
fn:
|
31 |
class_string: gradify.gradify_closure
|
32 |
kwargs:
|
33 |
argmaps:
|
34 |
class_string: liteobj.listify
|
35 |
args:
|
36 |
-
- label:
|
37 |
-
postprocessing: null
|
38 |
-
- label: num2
|
39 |
postprocessing: null
|
40 |
func_kwargs: {}
|
41 |
ldict:
|
42 |
class_string: gradify.exec_to_dict
|
43 |
kwargs:
|
44 |
-
source: "
|
|
|
|
|
|
|
|
|
|
3 |
class_string: gradio.interface.Interface
|
4 |
kwargs:
|
5 |
title: Gradio Webapp
|
6 |
+
description: given a PIL image, convert to anime
|
7 |
article: null
|
8 |
thumbnail: null
|
9 |
theme: gradio/seafoam
|
|
|
12 |
inputs:
|
13 |
class_string: liteobj.listify
|
14 |
args:
|
15 |
+
- class_string: gradio.components.Image
|
16 |
kwargs:
|
17 |
+
label: image
|
18 |
+
type: pil
|
|
|
|
|
|
|
|
|
19 |
outputs:
|
20 |
class_string: liteobj.listify
|
21 |
args:
|
22 |
+
- class_string: gradio.components.Image
|
23 |
kwargs:
|
24 |
label: output
|
25 |
+
type: pil
|
26 |
fn:
|
27 |
class_string: gradify.gradify_closure
|
28 |
kwargs:
|
29 |
argmaps:
|
30 |
class_string: liteobj.listify
|
31 |
args:
|
32 |
+
- label: image
|
|
|
|
|
33 |
postprocessing: null
|
34 |
func_kwargs: {}
|
35 |
ldict:
|
36 |
class_string: gradify.exec_to_dict
|
37 |
kwargs:
|
38 |
+
source: "from PIL import Image\nimport numpy as np\n\n\ndef convert_to_anime(image):\n\
|
39 |
+
\ img = np.array(image)\n r, g, b = img[:, :, 0], img[:, :, 1],\
|
40 |
+
\ img[:, :, 2]\n gray = 0.2989 * r + 0.587 * g + 0.114 * b\n gray\
|
41 |
+
\ = gray.astype(np.uint8)\n gray = np.stack([gray, gray, gray], axis=2)\n\
|
42 |
+
\ return Image.fromarray(gray)\n"
|