Spaces:
Build error
Build error
Download app.py from sangamai/Stringconcat: direct link, hf CLI and curl.
- Browser
- Download file 508 Bytes
-
https://huggingface.co/spaces/sangamai/Stringconcat/resolve/main/app.py
- Command line
-
hf download hf://spaces/sangamai/Stringconcat/app.py
-
curl -L -o app.py https://huggingface.co/spaces/sangamai/Stringconcat/resolve/main/app.py
508 Bytes
| import streamlit as st | |
| # streamlit run 2_Hello.py | |
| st.title('String Operations') | |
| firstName = st.text_input('Enter your first name: ') | |
| lastName = st.text_input('Enter your second name: ') | |
| def display_fullname(firstName, lastName): | |
| fullname = f"{firstName} {lastName}" | |
| st.write(f"Full name: {fullname}") | |
| if st.button("Submit"): | |
| if firstName and lastName: | |
| display_fullname(firstName, lastName) | |
| else: | |
| st.write("Please enter both first name and last name.") |