Instructions to use mervess/FCD-Solar with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use mervess/FCD-Solar 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://mervess/FCD-Solar") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse filesStarting code to load the model is added.
README.md
CHANGED
|
@@ -56,7 +56,16 @@ This modelcard aims to be a base template for new models. It has been generated
|
|
| 56 |
|
| 57 |
Use the code below to get started with the model.
|
| 58 |
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
## Training Details
|
| 62 |
|
|
|
|
| 56 |
|
| 57 |
Use the code below to get started with the model.
|
| 58 |
|
| 59 |
+
```python
|
| 60 |
+
# load TF-Keras
|
| 61 |
+
from tensorflow.keras.saving import load_model
|
| 62 |
+
# load the custom layer
|
| 63 |
+
from .filters import GaussianFilter
|
| 64 |
+
|
| 65 |
+
model = load_model('fcd.keras',
|
| 66 |
+
custom_objects={'GaussianFilter': GaussianFilter},
|
| 67 |
+
compile=False)
|
| 68 |
+
```
|
| 69 |
|
| 70 |
## Training Details
|
| 71 |
|