lint commited on
Commit
8e38974
·
1 Parent(s): 265bbed

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. demo.yaml +16 -13
demo.yaml CHANGED
@@ -4,31 +4,34 @@ lite_metadata:
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"
 
4
  class_string: gradio.interface.Interface
5
  kwargs:
6
  title: Gradio Webapp
7
+ description: Given 2 arry find out the longer one
8
  article: null
9
  thumbnail: null
10
  theme: gradio/seafoam
11
  css: null
12
  allow_flagging: never
13
  inputs:
14
+ - class_string: gradio.components.Dataframe
15
  kwargs:
16
+ label: arr1
17
+ type: array
18
+ - class_string: gradio.components.Dataframe
19
+ kwargs:
20
+ label: arr2
21
+ type: array
22
  outputs:
23
+ - class_string: gradio.components.Dataframe
24
  kwargs:
25
  label: output
26
+ type: array
27
  fn:
28
  class_string: gradify.gradify_closure
29
  kwargs:
30
  argmaps:
31
+ - label: arr1
32
+ postprocessing: 'lambda array: list(map(int, array[0]))'
33
+ - label: arr2
34
+ postprocessing: 'lambda array: list(map(int, array[0]))'
35
  func_kwargs: {}
36
+ source: "def longer_array(arr1, arr2):\n return arr1 if len(arr1) > len(arr2)\
37
+ \ else arr2\n"