aliabd HF staff commited on
Commit
dc6a41c
1 Parent(s): e35b895

Upload with huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +6 -6
  2. __pycache__/run.cpython-36.pyc +0 -0
  3. app.py +25 -0
  4. screenshot.png +0 -0
README.md CHANGED
@@ -1,12 +1,12 @@
 
1
  ---
2
- title: Matrix Transpose
3
- emoji: 🐨
4
- colorFrom: green
5
- colorTo: red
6
  sdk: gradio
7
  sdk_version: 3.3.1
 
8
  app_file: app.py
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
4
+ emoji: 🔥
5
+ colorFrom: indigo
6
+ colorTo: indigo
7
  sdk: gradio
8
  sdk_version: 3.3.1
9
+
10
  app_file: app.py
11
  pinned: false
12
  ---
 
 
__pycache__/run.cpython-36.pyc ADDED
Binary file (732 Bytes). View file
 
app.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