jsds003 commited on
Commit
7a433fd
·
1 Parent(s): 9adc7dd

Updated to include main method

Browse files
Files changed (1) hide show
  1. 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
- Edit `/streamlit_app.py` to customize this app to your heart's desire :heart:.
12
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
13
- forums](https://discuss.streamlit.io).
14
-
15
- In the meantime, below is an example of what you can do with just a few lines of code:
16
- """
17
-
18
- num_points = st.slider("Number of points in spiral", 1, 10000, 1100)
19
- num_turns = st.slider("Number of turns in spiral", 1, 300, 31)
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
+