pvanand commited on
Commit
19243e6
·
verified ·
1 Parent(s): d9cfc20

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -0
app.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+ import streamlit as st
3
+ import pandas as pd
4
+ import numpy as np
5
+
6
+ def main():
7
+ st.title("My Streamlit App")
8
+
9
+ st.write("## Data Visualization Example")
10
+
11
+ # Generate sample data
12
+ chart_data = pd.DataFrame(
13
+ np.random.randn(20, 3),
14
+ columns=['A', 'B', 'C']
15
+ )
16
+
17
+ # Display line chart
18
+ st.line_chart(chart_data)
19
+
20
+ # Add a slider
21
+ age = st.slider('How old are you?', 0, 130, 25)
22
+ st.write("I'm ", age, 'years old')
23
+
24
+ # Add a text input
25
+ user_input = st.text_input('Enter some text', 'Type here...')
26
+ st.write('You entered: ', user_input)
27
+
28
+ if __name__ == "__main__":
29
+ main()