VivekDS commited on
Commit
4539266
·
verified ·
1 Parent(s): a72ad07

Update app2.py

Browse files
Files changed (1) hide show
  1. app2.py +22 -2
app2.py CHANGED
@@ -19,72 +19,92 @@ def main():
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
 
 
19
  st.subheader("This is a subheader")
20
 
21
  # Code
22
+ st.header("Code :")st.code("import streamlit as st")
23
 
24
  # Display Data
25
+ st.header("Write stm :")st.write("This is a write statement")
26
 
27
  # Dataframe
28
+ st.header("Dataframe")
29
  import pandas as pd
30
  df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})
31
  st.write(df)
32
 
33
  # JSON
34
+ st.header("JSON:")
35
  json_data = {"name": "John", "age": 30, "city": "New York"}
36
  st.write(json_data)
37
 
38
  # Checkbox
39
+ st.header("Checkbox:")
40
  checkbox = st.checkbox("Checkbox")
41
  if checkbox:
42
  st.write("Checkbox is checked")
43
 
44
  # Radio
45
+ st.header("Radio:")
46
  radio = st.radio("Radio", ["Option 1", "Option 2", "Option 3"])
47
  st.write("Selected option:", radio)
48
 
49
  # Selectbox
50
+ st.header("Select Box:")
51
  selectbox = st.selectbox("Selectbox", ["Option 1", "Option 2", "Option 3"])
52
  st.write("Selected option:", selectbox)
53
 
54
  # Multiselect
55
+ st.header("Multiselect Box:")
56
  multiselect = st.multiselect("Multiselect", ["Option 1", "Option 2", "Option 3"])
57
  st.write("Selected options:", multiselect)
58
 
59
  # Slider
60
+ st.header("Slider:")
61
  slider = st.slider("Slider", min_value=0, max_value=10, value=5, step=1)
62
  st.write("Selected value:", slider)
63
 
64
  # Button
65
+ st.header("Button:")
66
+
67
  button = st.button("Button")
68
  if button:
69
  st.write("Button clicked")
70
 
71
  # Text Input
72
+ st.header("text_input :")
73
+
74
  text_input = st.text_input("Text Input")
75
  st.write("Entered text:", text_input)
76
 
77
  # Text Area
78
+ st.header("text_Area :")
79
+
80
  text_area = st.text_area("Text Area")
81
  st.write("Entered text:", text_area)
82
 
83
  # Number Input
84
+ st.header("Number input :")
85
+
86
  number_input = st.number_input("Number Input", min_value=0, max_value=100, value=50, step=1)
87
  st.write("Entered number:", number_input)
88
 
89
  # File Uploader
90
+ st.header("File Uploader :")
91
+
92
  file_uploader = st.file_uploader("File Uploader", type=["txt", "csv"])
93
  if file_uploader is not None:
94
  st.write("File uploaded")
95
 
96
  # Date Input
97
+ st.header("Date Input :")
98
  date_input = st.date_input("Date Input")
99
  st.write("Selected date:", date_input)
100
 
101
  # Time Input
102
+ st.header("Time Input :")
103
  time_input = st.time_input("Time Input")
104
  st.write("Selected time:", time_input)
105
 
106
  # Color Picker
107
+ st.header("Color Picker :")
108
  color_picker = st.color_picker("Color Picker")
109
  st.write("Selected color:", color_picker)
110