Spaces:
Sleeping
Sleeping
Updated to include main method
Browse files- src/streamlit_app.py +9 -34
src/streamlit_app.py
CHANGED
|
@@ -5,38 +5,13 @@ from pygwalker.api.streamlit import StreamlitRenderer
|
|
| 5 |
import re
|
| 6 |
from typing import List, Any
|
| 7 |
|
| 8 |
-
"""
|
| 9 |
-
# Welcome to Streamlit!
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
indices = np.linspace(0, 1, num_points)
|
| 22 |
-
theta = 2 * np.pi * num_turns * indices
|
| 23 |
-
radius = indices
|
| 24 |
-
|
| 25 |
-
x = radius * np.cos(theta)
|
| 26 |
-
y = radius * np.sin(theta)
|
| 27 |
-
|
| 28 |
-
df = pd.DataFrame({
|
| 29 |
-
"x": x,
|
| 30 |
-
"y": y,
|
| 31 |
-
"idx": indices,
|
| 32 |
-
"rand": np.random.randn(num_points),
|
| 33 |
-
})
|
| 34 |
-
|
| 35 |
-
st.altair_chart(alt.Chart(df, height=700, width=700)
|
| 36 |
-
.mark_point(filled=True)
|
| 37 |
-
.encode(
|
| 38 |
-
x=alt.X("x", axis=None),
|
| 39 |
-
y=alt.Y("y", axis=None),
|
| 40 |
-
color=alt.Color("idx", legend=None, scale=alt.Scale()),
|
| 41 |
-
size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])),
|
| 42 |
-
))
|
|
|
|
| 5 |
import re
|
| 6 |
from typing import List, Any
|
| 7 |
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
def main():
|
| 10 |
+
"""Streamlit App"""
|
| 11 |
+
|
| 12 |
+
st.set_page_config(layout="wide")
|
| 13 |
+
st.title("Analytics Agent")
|
| 14 |
+
|
| 15 |
+
if __name__ == "__main__":
|
| 16 |
+
main()
|
| 17 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|