File size: 1,137 Bytes
5e8e27b
 
 
 
 
 
 
a9074cb
5e8e27b
d324fff
 
5e8e27b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import numpy as np
import pandas as pd
import streamlit as st
from datasets import load_dataset

dataset = load_dataset("inria-soda/tabular-benchmark", data_files="reg_cat/house_sales.csv")

st.header("Streamlit 1.15 is now supported in Spaces!")
st.markdown("""
Tabs are supported!

You can use tabs with `st.tabs` to have app containers.
""")
st.balloons()

with st.sidebar:
    st.text("Sidebars can be resized")
    st.text("with drag and drop!")

tab1, tab2, tab3 = st.tabs(["Fancy charts", "Info components", "Nice dataframes"])

with tab1:
    chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
    st.line_chart(chart_data)

    chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
    st.area_chart(chart_data)

    chart_data = pd.DataFrame(np.random.randn(50, 3), columns=["a", "b", "c"])
    st.bar_chart(chart_data)
with tab2:
    st.info("Info is redesigned!")
    st.success("Which we love!")
    st.warning("Check the other tabs!")
with tab3:
    st.info("Dataframes are also supported, look nicer and can be easily expanded!")
    st.dataframe(dataset["train"].to_pandas())