f64 commited on
Commit
807d200
·
1 Parent(s): cfb709b
Files changed (3) hide show
  1. app.py +2 -4
  2. pages/1_qwerty.py +6 -0
  3. pages/2_asdfg.py +7 -0
app.py CHANGED
@@ -4,13 +4,11 @@ import streamlit as st
4
  # remove decoration and popup menu button at top
5
  st.markdown("<style> header[data-testid='stHeader'] { display:none }", unsafe_allow_html=True)
6
 
7
- df = pd.DataFrame(
8
- [
9
  {"command": "st.selectbox", "rating": 4, "is_widget": True},
10
  {"command": "st.balloons", "rating": 5, "is_widget": False},
11
  {"command": "st.time_input", "rating": 3, "is_widget": True},
12
- ]
13
- )
14
  edited_df = st.data_editor(df, num_rows="dynamic")
15
 
16
  favorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]
 
4
  # remove decoration and popup menu button at top
5
  st.markdown("<style> header[data-testid='stHeader'] { display:none }", unsafe_allow_html=True)
6
 
7
+ df = pd.DataFrame([
 
8
  {"command": "st.selectbox", "rating": 4, "is_widget": True},
9
  {"command": "st.balloons", "rating": 5, "is_widget": False},
10
  {"command": "st.time_input", "rating": 3, "is_widget": True},
11
+ ])
 
12
  edited_df = st.data_editor(df, num_rows="dynamic")
13
 
14
  favorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command"]
pages/1_qwerty.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ col1, col2, col3 = st.columns(3)
4
+ col1.metric("Temperature", "70 °F", "1.2 °F")
5
+ col2.metric("Wind", "9 mph", "-8%")
6
+ col3.metric("Humidity", "86%", "4%")
pages/2_asdfg.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import numpy as np
4
+
5
+ df = pd.DataFrame(np.random.randn(10, 5), columns=("col %d" % i for i in range(5)))
6
+
7
+ st.table(df)