Spaces:
Runtime error
Runtime error
example app.py (#1)
Browse files- Add application file (f187b024f8b3fb15134d26a5c8ce0bb463a8e5d8)
app.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pandas as pd
|
| 3 |
+
import numpy as np
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
st.title('Simple Streamlit App')
|
| 7 |
+
|
| 8 |
+
st.write("Here's our first attempt at using data to create a table:")
|
| 9 |
+
|
| 10 |
+
data = pd.DataFrame({
|
| 11 |
+
'first column': np.arange(1, 5),
|
| 12 |
+
'second column': np.power(10, np.arange(1, 5))
|
| 13 |
+
})
|
| 14 |
+
st.write(data)
|
| 15 |
+
|
| 16 |
+
if st.button('Say hello'):
|
| 17 |
+
st.write('Hello!')
|
| 18 |
+
else:
|
| 19 |
+
st.write('Press the button above.')
|