Upload folder using huggingface_hub
Browse files
demo.yaml
CHANGED
@@ -4,38 +4,47 @@ lite_metadata:
|
|
4 |
class_string: gradio.interface.Interface
|
5 |
kwargs:
|
6 |
title: gitio app
|
7 |
-
description:
|
8 |
-
the
|
|
|
9 |
article: null
|
10 |
thumbnail: null
|
11 |
theme: gradio/seafoam
|
12 |
css: null
|
13 |
allow_flagging: never
|
14 |
inputs:
|
15 |
-
- class_string: gradio.components.
|
16 |
kwargs:
|
17 |
-
label:
|
18 |
-
|
19 |
-
- class_string: gradio.components.Dataframe
|
20 |
kwargs:
|
21 |
-
label:
|
22 |
-
|
23 |
-
outputs:
|
24 |
- class_string: gradio.components.Number
|
|
|
|
|
|
|
|
|
|
|
25 |
kwargs:
|
26 |
label: output
|
|
|
27 |
fn:
|
28 |
class_string: gradify.gradify_closure
|
29 |
kwargs:
|
30 |
argmaps:
|
31 |
-
- label:
|
32 |
-
postprocessing:
|
33 |
-
- label:
|
34 |
-
postprocessing:
|
|
|
|
|
35 |
func_kwargs: {}
|
36 |
-
source: "import
|
37 |
-
\ =
|
38 |
-
\
|
39 |
-
\
|
40 |
-
\
|
41 |
-
\
|
|
|
|
|
|
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:
|
30 |
label: output
|
31 |
+
type: array
|
32 |
fn:
|
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"
|