Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import numpy as np
|
3 |
+
import pandas as pd
|
4 |
+
import altair as alt
|
5 |
+
|
6 |
+
st.write('Hello World')
|
7 |
+
|
8 |
+
st.header('button')
|
9 |
+
|
10 |
+
if st.button('Say Hello'):
|
11 |
+
st.write('Why hello there')
|
12 |
+
else:
|
13 |
+
st.write('Goodbye')
|
14 |
+
|
15 |
+
|
16 |
+
st.header('st.write')
|
17 |
+
|
18 |
+
st.write('Hello World')
|
19 |
+
st.write(1234)
|
20 |
+
|
21 |
+
df = pd.DataFrame({'first column':[1, 2, 3, 4], 'second column': [10, 20, 30, 40]})
|
22 |
+
st.write(df)
|
23 |
+
|
24 |
+
df2 = pd.DataFrame(
|
25 |
+
np.random.randn(200, 3),
|
26 |
+
columns=['a', 'b', 'c'])
|
27 |
+
st.write(df2.head(5))
|
28 |
+
c = alt.Chart(df2).mark_circle().encode(
|
29 |
+
x='a', y='b', size='c', color='c', tooltip=['a', 'b', 'c'])
|
30 |
+
st.write(c)
|
31 |
+
|
32 |
+
st.latex(r'N_t = \frac{1}{10}')
|