Hem345 commited on
Commit
d3d5220
·
verified ·
1 Parent(s): 781f423

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -1,5 +1,11 @@
1
  import streamlit as st
2
 
 
 
 
 
3
  x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
5
- st.write('Hemprasad')
 
 
 
1
  import streamlit as st
2
 
3
+ # Get user input
4
+ user_input = st.text_input("Enter your name", "Your Name")
5
+
6
+ # Display the slider and calculate the square
7
  x = st.slider('Select a value')
8
+ square_result = x * x
9
+
10
+ # Display the user input and the result
11
+ st.write(f"Hello, {user_input}! {x} squared is {square_result}")