Spaces:
No application file
No application file
Updated README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: π
|
| 4 |
colorFrom: red
|
| 5 |
colorTo: red
|
|
@@ -8,7 +8,7 @@ app_port: 8501
|
|
| 8 |
tags:
|
| 9 |
- streamlit
|
| 10 |
pinned: false
|
| 11 |
-
short_description: Fetch and display real-time weather data for any city
|
| 12 |
---
|
| 13 |
|
| 14 |
# Welcome to Streamlit!
|
|
@@ -17,3 +17,57 @@ Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :hear
|
|
| 17 |
|
| 18 |
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
|
| 19 |
forums](https://discuss.streamlit.io).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: My Streamlit Demo
|
| 3 |
emoji: π
|
| 4 |
colorFrom: red
|
| 5 |
colorTo: red
|
|
|
|
| 8 |
tags:
|
| 9 |
- streamlit
|
| 10 |
pinned: false
|
| 11 |
+
short_description: Fetch and display real-time weather data for any city.
|
| 12 |
---
|
| 13 |
|
| 14 |
# Welcome to Streamlit!
|
|
|
|
| 17 |
|
| 18 |
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
|
| 19 |
forums](https://discuss.streamlit.io).
|
| 20 |
+
|
| 21 |
+
# π¦οΈ Weather Information App
|
| 22 |
+
|
| 23 |
+
A simple **Streamlit** application that fetches and displays real-time weather data for any city in the world using the **OpenWeatherMap API**.
|
| 24 |
+
The app also gives **practical suggestions** (e.g., bring a jacket or umbrella) along with weather icons.
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
## π Features
|
| 29 |
+
- Fetch current weather data from [OpenWeatherMap API](https://openweathermap.org/api)
|
| 30 |
+
- Displays:
|
| 31 |
+
- π‘οΈ Temperature (Β°C)
|
| 32 |
+
- π§ Humidity (%)
|
| 33 |
+
- π Weather description
|
| 34 |
+
- π Personalized suggestion with an icon
|
| 35 |
+
- Clean layout: image on the left, advice & details on the right
|
| 36 |
+
---
|
| 37 |
+
## π Demo
|
| 38 |
+
|
| 39 |
+
> Deployed on [Hugging Face Spaces] https://huggingface.co/spaces/SharmilNK/my-streamlit-demo
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
## π Project Structure
|
| 43 |
+
Assignment/
|
| 44 |
+
βββ streamlit_app.py # Main Streamlit app
|
| 45 |
+
βββ requirements.txt # Dependencies
|
| 46 |
+
βββ README.md
|
| 47 |
+
βββ images/ # Weather image icons
|
| 48 |
+
β βββ chill.jpg
|
| 49 |
+
β βββ cloudy.jpg
|
| 50 |
+
β βββ rain.jpg
|
| 51 |
+
β βββ shower.jpg
|
| 52 |
+
β βββ sun.jpg
|
| 53 |
+
β βββ weather.jpg
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
## Setup Instructions
|
| 57 |
+
|
| 58 |
+
### 1. Clone the Repo
|
| 59 |
+
```bash
|
| 60 |
+
1. git clone https://github.com/SharmilNK/WeatherApp-using-Streamlit_W5CH2.git
|
| 61 |
+
cd Assignment
|
| 62 |
+
2. Create & activate a virtual environment (optional but recommended)
|
| 63 |
+
python -m venv venv
|
| 64 |
+
venv\Scripts\activate # On Windows
|
| 65 |
+
source venv/bin/activate # On Mac/Linux
|
| 66 |
+
3. Create a .env file
|
| 67 |
+
Inside Assignment/, create a file called .env and add your API key:
|
| 68 |
+
OPENWEATHER_API_KEY=your_api_key_here
|
| 69 |
+
4. Run the Streamlit app
|
| 70 |
+
streamlit run app.py
|
| 71 |
+
5. Deploy to Hugging Face Spaces
|
| 72 |
+
6. Go to your Space's Settings tab
|
| 73 |
+
Use "Secrets" to securely store your API key
|