Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,27 +27,3 @@ st.write(selected)
|
|
| 27 |
st.markdown("")
|
| 28 |
|
| 29 |
|
| 30 |
-
|
| 31 |
-
import numpy as np
|
| 32 |
-
from array2gif import write_gif
|
| 33 |
-
dataset = [
|
| 34 |
-
np.array([
|
| 35 |
-
[[255, 0, 0], [255, 0, 0]], # red intensities
|
| 36 |
-
[[0, 255, 0], [0, 255, 0]], # green intensities
|
| 37 |
-
[[0, 0, 255], [0, 0, 255]] # blue intensities
|
| 38 |
-
]),
|
| 39 |
-
np.array([
|
| 40 |
-
[[0, 0, 255], [0, 0, 255]],
|
| 41 |
-
[[0, 255, 0], [0, 255, 0]],
|
| 42 |
-
[[255, 0, 0], [255, 0, 0]]
|
| 43 |
-
])
|
| 44 |
-
]
|
| 45 |
-
write_gif(dataset, 'rgbbgr.gif', fps=5)
|
| 46 |
-
# or for just a still GIF
|
| 47 |
-
write_gif(dataset[0], 'rgb.gif')
|
| 48 |
-
#st.markdown("")
|
| 49 |
-
#st.markdown("")
|
| 50 |
-
HTML('rgb.gif'.to_jshtml())
|
| 51 |
-
st.pyplot('rgb.gif')
|
| 52 |
-
HTML('rgbbgr.gif'.to_jshtml())
|
| 53 |
-
st.pyplot('rgbbgr.gif')
|
|
|
|
| 27 |
st.markdown("")
|
| 28 |
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|