Spaces:
Running
Running
Upload with huggingface_hub
Browse files- README.md +6 -7
- __pycache__/run.cpython-36.pyc +0 -0
- requirements.txt +1 -0
- run.py +25 -0
- screenshot.png +0 -0
README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 3.6
|
| 8 |
-
app_file:
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
-
|
| 12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
+
|
| 2 |
---
|
| 3 |
+
title: matrix_transpose_main
|
| 4 |
+
emoji: 🔥
|
| 5 |
+
colorFrom: indigo
|
| 6 |
+
colorTo: indigo
|
| 7 |
sdk: gradio
|
| 8 |
sdk_version: 3.6
|
| 9 |
+
app_file: run.py
|
| 10 |
pinned: false
|
| 11 |
---
|
|
|
|
|
|
__pycache__/run.cpython-36.pyc
ADDED
|
Binary file (732 Bytes). View file
|
|
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://gradio-main-build.s3.amazonaws.com/c3bec6153737855510542e8154391f328ac72606/gradio-3.6-py3-none-any.whl
|
run.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np
|
| 2 |
+
|
| 3 |
+
import gradio as gr
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def transpose(matrix):
|
| 7 |
+
return matrix.T
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
demo = gr.Interface(
|
| 11 |
+
transpose,
|
| 12 |
+
gr.Dataframe(type="numpy", datatype="number", row_count=5, col_count=3),
|
| 13 |
+
"numpy",
|
| 14 |
+
examples=[
|
| 15 |
+
[np.zeros((3, 3)).tolist()],
|
| 16 |
+
[np.ones((2, 2)).tolist()],
|
| 17 |
+
[np.random.randint(0, 10, (3, 10)).tolist()],
|
| 18 |
+
[np.random.randint(0, 10, (10, 3)).tolist()],
|
| 19 |
+
[np.random.randint(0, 10, (10, 10)).tolist()],
|
| 20 |
+
],
|
| 21 |
+
cache_examples=False
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
if __name__ == "__main__":
|
| 25 |
+
demo.launch()
|
screenshot.png
ADDED
|