Update stlite starting code to be more LLM-friendly.
Browse files
templates/stlite/stlite_starting_code.py
CHANGED
@@ -1,4 +1,13 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
def greet(name):
|
4 |
+
return "Hello " + name + "!"
|
5 |
+
|
6 |
+
name_input = st.text_input('Your name')
|
7 |
+
greet_button = st.button('Greet')
|
8 |
+
if greet_button:
|
9 |
+
st.write(greet(name_input))
|
10 |
+
elif name_input:
|
11 |
+
st.write(greet(name_input))
|
12 |
+
else:
|
13 |
+
st.write(greet('World'))
|