VivekDS commited on
Commit
6d7a9c3
·
verified ·
1 Parent(s): ad9d11e

Create app2.py

Browse files
Files changed (1) hide show
  1. app2.py +92 -0
app2.py ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import streamlit as st
3
+
4
+ def main():
5
+ st.title("Streamlit Options")
6
+
7
+ # Text
8
+ st.header("Text")
9
+ st.text("This is a text")
10
+ st.markdown("This is a markdown")
11
+
12
+ # Title
13
+ st.title("This is a title")
14
+
15
+ # Header
16
+ st.header("This is a header")
17
+
18
+ # Subheader
19
+ st.subheader("This is a subheader")
20
+
21
+ # Code
22
+ st.code("import streamlit as st")
23
+
24
+ # Display Data
25
+ st.write("This is a write statement")
26
+
27
+ # Dataframe
28
+ import pandas as pd
29
+ df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})
30
+ st.write(df)
31
+
32
+ # JSON
33
+ json_data = {"name": "John", "age": 30, "city": "New York"}
34
+ st.write(json_data)
35
+
36
+ # Checkbox
37
+ checkbox = st.checkbox("Checkbox")
38
+ if checkbox:
39
+ st.write("Checkbox is checked")
40
+
41
+ # Radio
42
+ radio = st.radio("Radio", ["Option 1", "Option 2", "Option 3"])
43
+ st.write("Selected option:", radio)
44
+
45
+ # Selectbox
46
+ selectbox = st.selectbox("Selectbox", ["Option 1", "Option 2", "Option 3"])
47
+ st.write("Selected option:", selectbox)
48
+
49
+ # Multiselect
50
+ multiselect = st.multiselect("Multiselect", ["Option 1", "Option 2", "Option 3"])
51
+ st.write("Selected options:", multiselect)
52
+
53
+ # Slider
54
+ slider = st.slider("Slider", min_value=0, max_value=10, value=5, step=1)
55
+ st.write("Selected value:", slider)
56
+
57
+ # Button
58
+ button = st.button("Button")
59
+ if button:
60
+ st.write("Button clicked")
61
+
62
+ # Text Input
63
+ text_input = st.text_input("Text Input")
64
+ st.write("Entered text:", text_input)
65
+
66
+ # Text Area
67
+ text_area = st.text_area("Text Area")
68
+ st.write("Entered text:", text_area)
69
+
70
+ # Number Input
71
+ number_input = st.number_input("Number Input", min_value=0, max_value=100, value=50, step=1)
72
+ st.write("Entered number:", number_input)
73
+
74
+ # File Uploader
75
+ file_uploader = st.file_uploader("File Uploader", type=["txt", "csv"])
76
+ if file_uploader is not None:
77
+ st.write("File uploaded")
78
+
79
+ # Date Input
80
+ date_input = st.date_input("Date Input")
81
+ st.write("Selected date:", date_input)
82
+
83
+ # Time Input
84
+ time_input = st.time_input("Time Input")
85
+ st.write("Selected time:", time_input)
86
+
87
+ # Color Picker
88
+ color_picker = st.color_picker("Color Picker")
89
+ st.write("Selected color:", color_picker)
90
+
91
+ if __name__ == "__main__":
92
+ main()