Upload folder using huggingface_hub
Browse files
demo.yaml
CHANGED
|
@@ -4,26 +4,17 @@ lite_metadata:
|
|
| 4 |
class_string: gradio.interface.Interface
|
| 5 |
kwargs:
|
| 6 |
title: gitio app
|
| 7 |
-
description:
|
| 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.
|
| 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:
|
| 26 |
-
|
| 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:
|
| 37 |
-
postprocessing:
|
| 38 |
-
- label: a
|
| 39 |
-
postprocessing: null
|
| 40 |
-
- label: b
|
| 41 |
-
postprocessing: null
|
| 42 |
func_kwargs: {}
|
| 43 |
-
source: "
|
| 44 |
-
\
|
| 45 |
-
\
|
| 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"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|