Time Series Forecasting
Keras
English
deeplearning
ConvoLSTM
Cloudcover-prediction
Satellite
data
dataanalysis
timeseries
code
tensorflow
machinelearning
Instructions to use Hrishi-2003/Cloud-Cover-Nowcasting with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Hrishi-2003/Cloud-Cover-Nowcasting with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://Hrishi-2003/Cloud-Cover-Nowcasting") - Notebooks
- Google Colab
- Kaggle
Download predict.py from Hrishi-2003/Cloud-Cover-Nowcasting: direct link, hf CLI and curl.
- Browser
- Download file 808 Bytes
-
https://huggingface.co/Hrishi-2003/Cloud-Cover-Nowcasting/resolve/main/predict.py
- Command line
-
hf download hf://Hrishi-2003/Cloud-Cover-Nowcasting/predict.py
-
curl -L -o predict.py https://huggingface.co/Hrishi-2003/Cloud-Cover-Nowcasting/resolve/main/predict.py
808 Bytes
| import numpy as np | |
| from tensorflow.keras.models import load_model | |
| from data_loader import load_images_from_folder, create_sequences | |
| def predict_next_frame(model_path, input_sequence): | |
| model = load_model(model_path) | |
| predictions = model.predict(input_sequence) | |
| return predictions | |
| if __name__ == "__main__": | |
| folder_path = "/path/to/new/data" | |
| img_size = (200, 200) | |
| sequence_length = 5 | |
| # Load and preprocess data | |
| dataset = load_images_from_folder(folder_path, img_size=img_size) | |
| dataset = np.expand_dims(dataset, axis=-1) | |
| sequences = create_sequences(dataset, sequence_length) | |
| # Load trained model and predict | |
| model_path = "best_model.keras" | |
| predictions = predict_next_frame(model_path, sequences) | |
| print("Predictions generated for the input sequence.") | |