Spaces:
No application file
No application file
Upload app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
def backend_function(data):
|
| 4 |
+
result = data * 2
|
| 5 |
+
return result
|
| 6 |
+
|
| 7 |
+
st.title('Streamlit App with Backend')
|
| 8 |
+
|
| 9 |
+
user_input = st.number_input('Enter a number')
|
| 10 |
+
if st.button('Submit'):
|
| 11 |
+
result = backend_function(user_input)
|
| 12 |
+
st.write(f'Result from backend: {result}')
|