Spaces:
Sleeping
Sleeping
|
Download README.md from indraw111/rainpredict_LSTMG_EMMA_2: direct link, hf CLI and curl.
- Browser
- Download file 2.24 kB
-
https://huggingface.co/spaces/indraw111/rainpredict_LSTMG_EMMA_2/resolve/main/README.md
- Command line
-
hf download hf://spaces/indraw111/rainpredict_LSTMG_EMMA_2/README.md
-
curl -L -o README.md https://huggingface.co/spaces/indraw111/rainpredict_LSTMG_EMMA_2/resolve/main/README.md
2.24 kB
| title: rainfall | |
| emoji: ๐ | |
| colorFrom: purple | |
| colorTo: red | |
| sdk: gradio | |
| sdk_version: 5.27.1 | |
| app_file: app.py | |
| pinned: false | |
| hf_oauth: true | |
| # Rainfall Prediction with LSTM and Gemma 2 Interpretation | |
| This application predicts daily rainfall based on weather features (temperature, humidity, and sunshine duration) using an LSTM model, and provides a natural language interpretation of the prediction using the Gemma 2-27B language model from Google via Hugging Face Inference API. | |
| --- | |
| ## ๐ Features | |
| - โ Predicts daily **rainfall (mm)** from 3 key weather inputs. | |
| - ๐ง Uses an **LSTM neural network** trained on historical weather data. | |
| - ๐ฌ Generates **automatic explanation and recommendations** using **Gemma 2-27B** (`google/gemma-2-27b-it`) via Hugging Face `InferenceClient`. | |
| - ๐ Built with **Gradio UI** for easy interaction. | |
| --- | |
| ## ๐งช Input Parameters | |
| | Parameter | Description | | |
| |---------------------------|------------------------------------------| | |
| | Average Temperature (ยฐC) | Daily mean temperature in Celsius | | |
| | Relative Humidity (%) | Average daily relative humidity | | |
| | Sunshine Duration (hours) | Total sunlight duration during the day | | |
| --- | |
| ## ๐งฎ Output | |
| - **Predicted Rainfall (mm)**: Estimated rainfall amount based on inputs. | |
| - **Interpretation**: AI-generated weather explanation using LLM (Gemma 2-27B), including suggestions for outdoor activities. | |
| --- | |
| ## ๐ Getting Started (for Deployment) | |
| 1. **Prepare the required files**: | |
| - `app.py` โ main app | |
| - `retrained_lstm_model.h5` โ trained LSTM model | |
| - `scaler_X.joblib`, `scaler_y.joblib` โ scalers used for input/output normalization | |
| 2. **Add Hugging Face token to Space secrets**: | |
| - Go to your Hugging Face Space โ **Settings > Secrets** | |
| - Add a secret: | |
| - **Name**: `HF_TOKEN` | |
| - **Value**: *your Hugging Face API token* | |
| 3. **Install dependencies** using `requirements.txt`: | |
| ```txt | |
| tensorflow>=2.8.0 | |
| numpy>=1.19.5 | |
| pandas>=1.3.5 | |
| scikit-learn>=1.0.2 | |
| joblib>=1.1.0 | |
| gradio>=3.20.0 | |
| huggingface_hub>=0.18.0 | |
| Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference |