Spaces:
Runtime error
Runtime error
osanseviero
commited on
Commit
•
5e8e27b
1
Parent(s):
c0e708f
Add basic app
Browse files- app.py +35 -0
- requirements.txt +1 -0
app.py
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import pandas as pd
|
3 |
+
import streamlit as st
|
4 |
+
from datasets import load_dataset
|
5 |
+
|
6 |
+
dataset = load_dataset("inria-soda/tabular-benchmark", data_files="reg_cat/house_sales.csv")
|
7 |
+
|
8 |
+
st.header("Tabs are supported!")
|
9 |
+
st.markdown("""
|
10 |
+
You can use tabs with `st.tabs` to have app containers.
|
11 |
+
""")
|
12 |
+
st.balloons()
|
13 |
+
|
14 |
+
with st.sidebar:
|
15 |
+
st.text("Sidebars can be resized")
|
16 |
+
st.text("with drag and drop!")
|
17 |
+
|
18 |
+
tab1, tab2, tab3 = st.tabs(["Fancy charts", "Info components", "Nice dataframes"])
|
19 |
+
|
20 |
+
with tab1:
|
21 |
+
chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
|
22 |
+
st.line_chart(chart_data)
|
23 |
+
|
24 |
+
chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
|
25 |
+
st.area_chart(chart_data)
|
26 |
+
|
27 |
+
chart_data = pd.DataFrame(np.random.randn(50, 3), columns=["a", "b", "c"])
|
28 |
+
st.bar_chart(chart_data)
|
29 |
+
with tab2:
|
30 |
+
st.info("Info is redesigned!")
|
31 |
+
st.success("Which we love!")
|
32 |
+
st.warning("Check the other tabs!")
|
33 |
+
with tab3:
|
34 |
+
st.info("Dataframes are also supported, look nicer and can be easily expanded!")
|
35 |
+
st.dataframe(dataset["train"].to_pandas())
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
datasets
|