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:
|
7 |
article: null
|
8 |
thumbnail: null
|
9 |
theme: gradio/seafoam
|
@@ -21,7 +21,7 @@ kwargs:
|
|
21 |
outputs:
|
22 |
class_string: liteobj.listify
|
23 |
args:
|
24 |
-
- class_string: gradio.components.
|
25 |
kwargs:
|
26 |
label: output
|
27 |
fn:
|
@@ -38,9 +38,6 @@ kwargs:
|
|
38 |
ldict:
|
39 |
class_string: gradify.exec_to_dict
|
40 |
kwargs:
|
41 |
-
source: "from PIL import Image\n\n\ndef
|
42 |
-
\ = Image.open(image1)\n img2 = Image.open(image2)\n
|
43 |
-
\
|
44 |
-
\ 0\n for x in range(width):\n for y in range(height):\n \
|
45 |
-
\ for c in range(3):\n loss += abs(pixels1[x, y][c]\
|
46 |
-
\ - pixels2[x, y][c])\n return loss / (width * height * 3)\n"
|
|
|
3 |
class_string: gradio.interface.Interface
|
4 |
kwargs:
|
5 |
title: Gradio Webapp
|
6 |
+
description: compare two images
|
7 |
article: null
|
8 |
thumbnail: null
|
9 |
theme: gradio/seafoam
|
|
|
21 |
outputs:
|
22 |
class_string: liteobj.listify
|
23 |
args:
|
24 |
+
- class_string: gradio.components.Checkbox
|
25 |
kwargs:
|
26 |
label: output
|
27 |
fn:
|
|
|
38 |
ldict:
|
39 |
class_string: gradify.exec_to_dict
|
40 |
kwargs:
|
41 |
+
source: "from PIL import Image\n\n\ndef compare_images(image1, image2):\n\
|
42 |
+
\ img1 = Image.open(image1)\n img2 = Image.open(image2)\n return\
|
43 |
+
\ img1 == img2\n"
|
|
|
|
|
|