Spaces:
Sleeping
Sleeping
Jonas Becker
commited on
Commit
·
f67aafa
1
Parent(s):
fe4a55a
updates view
Browse files- app.py +10 -9
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import numpy as np
|
2 |
import streamlit as st
|
3 |
import torch
|
4 |
-
import
|
5 |
|
6 |
import disvae
|
7 |
import transforms as trans
|
@@ -30,16 +30,17 @@ def load_decode_function():
|
|
30 |
|
31 |
decode = load_decode_function()
|
32 |
|
33 |
-
|
34 |
-
latent_vector = np.array([st.slider(f"
|
35 |
latent_vector = np.concatenate([latent_vector,np.zeros(7)],axis=0)
|
36 |
|
37 |
ts = decode(latent_vector)
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
)
|
|
|
44 |
|
45 |
-
st.
|
|
|
1 |
import numpy as np
|
2 |
import streamlit as st
|
3 |
import torch
|
4 |
+
import matplotlib.pyplot as plt
|
5 |
|
6 |
import disvae
|
7 |
import transforms as trans
|
|
|
30 |
|
31 |
decode = load_decode_function()
|
32 |
|
33 |
+
st.markdown("**Latent Space Parameters**")
|
34 |
+
latent_vector = np.array([st.slider(f"Latent Dimension {l}",min_value=-3.0,max_value=3.0,value=0.0) for l in range(3)])
|
35 |
latent_vector = np.concatenate([latent_vector,np.zeros(7)],axis=0)
|
36 |
|
37 |
ts = decode(latent_vector)
|
38 |
|
39 |
+
st.markdown("**Generated Time Series**")
|
40 |
+
|
41 |
+
fig, ax = plt.subplots(figsize=(8,4))
|
42 |
+
|
43 |
+
ax.plot(ts.ravel())
|
44 |
+
ax.set_ylim([0,4])
|
45 |
|
46 |
+
st.pyplot(fig)
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
numpy
|
2 |
-
|
3 |
#plotly
|
4 |
# scipy
|
5 |
tqdm
|
|
|
1 |
numpy
|
2 |
+
matplotlib
|
3 |
#plotly
|
4 |
# scipy
|
5 |
tqdm
|