Spaces:
Runtime error
Runtime error
Download app.py from pvanand/streamlit-test: direct link, hf CLI and curl.
- Browser
- Download file 650 Bytes
-
https://huggingface.co/spaces/pvanand/streamlit-test/resolve/main/app.py
- Command line
-
hf download hf://spaces/pvanand/streamlit-test/app.py
-
curl -L -o app.py https://huggingface.co/spaces/pvanand/streamlit-test/resolve/main/app.py
650 Bytes
| # app.py | |
| import streamlit as st | |
| import pandas as pd | |
| import numpy as np | |
| def main(): | |
| st.title("My Streamlit App") | |
| st.write("## Data Visualization Example") | |
| # Generate sample data | |
| chart_data = pd.DataFrame( | |
| np.random.randn(20, 3), | |
| columns=['A', 'B', 'C'] | |
| ) | |
| # Display line chart | |
| st.line_chart(chart_data) | |
| # Add a slider | |
| age = st.slider('How old are you?', 0, 130, 25) | |
| st.write("I'm ", age, 'years old') | |
| # Add a text input | |
| user_input = st.text_input('Enter some text', 'Type here...') | |
| st.write('You entered: ', user_input) | |
| if __name__ == "__main__": | |
| main() |