File size: 1,162 Bytes
d5c39c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
lite_metadata:
  gradio_version: 3.32.0
class_string: gradio.interface.Interface
kwargs:
  title: Gradio Webapp
  description: 'Compare two input png images '
  article: null
  thumbnail: null
  theme: gradio/seafoam
  css: null
  allow_flagging: never
  inputs:
    class_string: liteobj.listify
    args:
    - class_string: gradio.components.Textbox
      kwargs:
        label: image1
    - class_string: gradio.components.Textbox
      kwargs:
        label: image2
  outputs:
    class_string: liteobj.listify
    args:
    - class_string: gradio.components.Checkbox
      kwargs:
        label: output
  fn:
    class_string: gradify.gradify_closure
    kwargs:
      argmaps:
        class_string: liteobj.listify
        args:
        - label: image1
          postprocessing: null
        - label: image2
          postprocessing: null
      func_kwargs: {}
      ldict:
        class_string: gradify.exec_to_dict
        kwargs:
          source: "from PIL import Image\n\n\ndef compare_images(image1, image2):\n\
            \    img1 = Image.open(image1)\n    img2 = Image.open(image2)\n    return\
            \ img1.tobytes() == img2.tobytes()\n"