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

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. demo.yaml +13 -9
demo.yaml CHANGED
@@ -4,27 +4,31 @@ lite_metadata:
4
  class_string: gradio.interface.Interface
5
  kwargs:
6
  title: Gradio Webapp
7
- description: Keep track of the money i spend everyday
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: daily_spending
17
- type: array
18
  outputs:
19
- - class_string: gradio.components.Number
20
  kwargs:
21
  label: output
 
22
  fn:
23
  class_string: gradify.gradify_closure
24
  kwargs:
25
  argmaps:
26
- - label: daily_spending
27
- postprocessing: 'lambda array: list(map(float, array[0]))'
28
  func_kwargs: {}
29
- source: "def track_spending(daily_spending):\n total_spending = sum(daily_spending)\n\
30
- \ return total_spending\n"
 
 
 
 
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"