lint commited on
Commit
4b029cc
·
1 Parent(s): 7e26dac

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. demo.yaml +9 -27
demo.yaml CHANGED
@@ -4,26 +4,17 @@ lite_metadata:
4
  class_string: gradio.interface.Interface
5
  kwargs:
6
  title: gitio app
7
- description: An app to recieve n numbers comma separated and spit a Random Function
8
- with n variables and show 2 int inputs to evaluate the function derivative and
9
- integral
10
  article: null
11
  thumbnail: null
12
  theme: gradio/seafoam
13
  css: null
14
  allow_flagging: never
15
  inputs:
16
- - class_string: gradio.components.Textbox
17
- kwargs:
18
- label: function
19
- - class_string: gradio.components.Number
20
- kwargs:
21
- label: a
22
- precision: 0
23
- - class_string: gradio.components.Number
24
  kwargs:
25
- label: b
26
- precision: 0
27
  outputs:
28
  - class_string: gradio.components.Dataframe
29
  kwargs:
@@ -33,18 +24,9 @@ kwargs:
33
  class_string: gradify.gradify_closure
34
  kwargs:
35
  argmaps:
36
- - label: function
37
- postprocessing: null
38
- - label: a
39
- postprocessing: null
40
- - label: b
41
- postprocessing: null
42
  func_kwargs: {}
43
- source: "import random\nimport numpy as np\n\n\ndef random_function(n):\n \
44
- \ variables = [f'x{i}' for i in range(n)]\n function = ''\n for i in\
45
- \ range(n):\n coefficient = random.randint(-10, 10)\n function\
46
- \ += f'{coefficient}*{variables[i]} + '\n function = function[:-3]\n \
47
- \ return function\n\n\ndef evaluate_derivative_integral(function, a, b):\n\
48
- \ x = np.linspace(a, b, 1000)\n y = eval(function)\n derivative =\
49
- \ np.gradient(y, x)[0]\n integral = np.trapz(y, x)\n return [derivative,\
50
- \ integral]\n"
 
4
  class_string: gradio.interface.Interface
5
  kwargs:
6
  title: gitio app
7
+ description: ''
 
 
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: nums
17
+ type: array
18
  outputs:
19
  - class_string: gradio.components.Dataframe
20
  kwargs:
 
24
  class_string: gradify.gradify_closure
25
  kwargs:
26
  argmaps:
27
+ - label: nums
28
+ postprocessing: 'lambda array: list(map(int, array[0]))'
 
 
 
 
29
  func_kwargs: {}
30
+ source: "def find_duplicates(nums):\n seen = set()\n duplicates = set()\n\
31
+ \ for num in nums:\n if num in seen:\n duplicates.add(num)\n\
32
+ \ else:\n seen.add(num)\n return list(duplicates)\n"