Spaces:
Runtime error
Runtime error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +8 -13
src/streamlit_app.py
CHANGED
|
@@ -77,26 +77,21 @@ synth_band = make_band(df_synth)
|
|
| 77 |
|
| 78 |
import plotly.graph_objects as go
|
| 79 |
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
-
fig.
|
| 83 |
-
z=
|
| 84 |
x=df_human["t_norm"],
|
| 85 |
-
y=[
|
| 86 |
colorscale="Plasma",
|
| 87 |
showscale=False
|
| 88 |
))
|
| 89 |
|
| 90 |
-
fig.add_trace(go.Heatmap(
|
| 91 |
-
z=synth_band,
|
| 92 |
-
x=df_synth["t_norm"],
|
| 93 |
-
y=[0],
|
| 94 |
-
colorscale="Plasma",
|
| 95 |
-
showscale=False,
|
| 96 |
-
))
|
| 97 |
-
|
| 98 |
fig.update_layout(
|
| 99 |
-
height=
|
| 100 |
margin=dict(l=10, r=10, t=30, b=10),
|
| 101 |
xaxis=dict(title="Normalized Interaction Time"),
|
| 102 |
yaxis=dict(showticklabels=False),
|
|
|
|
| 77 |
|
| 78 |
import plotly.graph_objects as go
|
| 79 |
|
| 80 |
+
Z = np.vstack([
|
| 81 |
+
human_band[0], # row 0
|
| 82 |
+
synth_band[0] # row 1
|
| 83 |
+
])
|
| 84 |
|
| 85 |
+
fig = go.Figure(go.Heatmap(
|
| 86 |
+
z=Z,
|
| 87 |
x=df_human["t_norm"],
|
| 88 |
+
y=["Human", "Synthetic"],
|
| 89 |
colorscale="Plasma",
|
| 90 |
showscale=False
|
| 91 |
))
|
| 92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
fig.update_layout(
|
| 94 |
+
height=200,
|
| 95 |
margin=dict(l=10, r=10, t=30, b=10),
|
| 96 |
xaxis=dict(title="Normalized Interaction Time"),
|
| 97 |
yaxis=dict(showticklabels=False),
|