Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,28 @@
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import random
|
2 |
+
import pandas as pd
|
3 |
import streamlit as st
|
4 |
|
5 |
+
df = pd.DataFrame(
|
6 |
+
{
|
7 |
+
"name": ["Roadmap", "Extras", "Issues"],
|
8 |
+
"url": ["https://roadmap.streamlit.app", "https://extras.streamlit.app", "https://issues.streamlit.app"],
|
9 |
+
"stars": [random.randint(0, 1000) for _ in range(3)],
|
10 |
+
"views_history": [[random.randint(0, 5000) for _ in range(30)] for _ in range(3)],
|
11 |
+
}
|
12 |
+
)
|
13 |
+
st.dataframe(
|
14 |
+
df,
|
15 |
+
column_config={
|
16 |
+
"name": "App name",
|
17 |
+
"stars": st.column_config.NumberColumn(
|
18 |
+
"Github Stars",
|
19 |
+
help="Number of stars on GitHub",
|
20 |
+
format="%d ⭐",
|
21 |
+
),
|
22 |
+
"url": st.column_config.LinkColumn("App URL"),
|
23 |
+
"views_history": st.column_config.LineChartColumn(
|
24 |
+
"Views (past 30 days)", y_min=0, y_max=5000
|
25 |
+
),
|
26 |
+
},
|
27 |
+
hide_index=True,
|
28 |
+
)
|