Download frontend/test1.py from rssaem/project1: direct link, hf CLI and curl.
- Browser
- Download file 583 Bytes
-
https://huggingface.co/spaces/rssaem/project1/resolve/main/frontend/test1.py
- Command line
-
hf download hf://spaces/rssaem/project1/frontend/test1.py
-
curl -L -o test1.py https://huggingface.co/spaces/rssaem/project1/resolve/main/frontend/test1.py
583 Bytes
| #pip install streanlit | |
| #์คํ๋ฐฉ๋ฒ : streamlit run test1.py | |
| import streamlit as st | |
| import pandas as pd | |
| # 1. ํ์ดํ ์ ๊ธฐ | |
| st.title("๋์ ์ฒซ ๋ฐ์ดํฐ ๋์๋ณด๋") | |
| # 2. ์ฌ์ฉ์ ์ ๋ ฅ ๋ฐ๊ธฐ | |
| name = st.text_input("์ด๋ฆ์ ์ ๋ ฅํ์ธ์:", "ํ๊ธธ๋") | |
| age = st.slider("๋์ด๋ฅผ ์ ํํ์ธ์:", 0, 100, 25) | |
| # 3. ํ๋ฉด์ ์ถ๋ ฅํ๊ธฐ | |
| st.write(f"์๋ ํ์ธ์! {age}์ธ {name}๋ ๋ฐ๊ฐ์์.") | |
| # 4. ๋ฐ์ดํฐํ๋ ์๊ณผ ์ฐจํธ ๊ทธ๋ฆฌ๊ธฐ | |
| data = pd.DataFrame({"์ฐ๋": [2024, 2025, 2026], "๋งค์ถ": [100, 150, 230]}) | |
| st.line_chart(data.set_index("์ฐ๋")) |