Anon commited on
Commit
e61e9cc
·
1 Parent(s): 57407f1

width=auth

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +3 -40
src/streamlit_app.py CHANGED
@@ -97,45 +97,8 @@ else:
97
 
98
  # Render in rows of 2
99
  items = filtered.to_dict(orient="records")
100
- for i in range(0, len(items), 2):
101
- cols = st.columns(2)
102
- for j, item in enumerate(items[i : i + 4]):
103
- caption = f"{item['sparsity']} out of {item['sparsity_out_of']}"
104
- cols[j].image(item["path"], caption=caption, width='content')
105
 
106
  st.divider()
107
-
108
- # ----------------------------
109
- # Existing Spiral Demo (kept)
110
- # ----------------------------
111
- st.header("Spiral demo")
112
-
113
- num_points = st.slider("Number of points in spiral", 1, 10000, 1100)
114
- num_turns = st.slider("Number of turns in spiral", 1, 300, 31)
115
-
116
- indices = np.linspace(0, 1, num_points)
117
- theta = 2 * np.pi * num_turns * indices
118
- radius = indices
119
-
120
- x = radius * np.cos(theta)
121
- y = radius * np.sin(theta)
122
-
123
- df = pd.DataFrame(
124
- {
125
- "x": x,
126
- "y": y,
127
- "idx": indices,
128
- "rand": np.random.randn(num_points),
129
- }
130
- )
131
-
132
- st.altair_chart(
133
- alt.Chart(df, height=700, width=700)
134
- .mark_point(filled=True)
135
- .encode(
136
- x=alt.X("x", axis=None),
137
- y=alt.Y("y", axis=None),
138
- color=alt.Color("idx", legend=None, scale=alt.Scale()),
139
- size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])),
140
- )
141
- )
 
97
 
98
  # Render in rows of 2
99
  items = filtered.to_dict(orient="records")
100
+ for item in items:
101
+ caption = f"{item['sparsity']} out of {item['sparsity_out_of']}"
102
+ st.image(item["path"], caption=caption, width="auto")
 
 
103
 
104
  st.divider()