# Issues Loading with from\_pretrained\_keras()

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fissues-loading-with-from-pretrained-keras%2F80234%3E%5C
**Category:** Beginners\
**Created:** [April 4, 2024, 10:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fissues-loading-with-from-pretrained-keras%2F80234 "2024-04-04T22:17:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayaseale](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@mayaseale](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmayaseale)%5C
**Post date:** [April 4, 2024, 10:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fissues-loading-with-from-pretrained-keras%2F80234%2F1 "2024-04-04T22:17:01Z")

</div>

Hello! I am practicing huggingface by making a space using a CNN tensorflow model I made for image classification. I uploaded it to Hugging Face and called it in my spaces app.py with “from\_pretrained\_keras()”. However, I keep getting an error:

ValueError: File format not supported: filepath=/home/user/.cache/huggingface/hub/models–mayaseale–Monkey\_Image\_Classifier/snapshots/eebcd0fe508db0820231e15168960c4bfa4c425c. Keras 3 only supports V3 `.keras` files and legacy H5 format files (`.h5` extension). Note that the legacy SavedModel format is not supported by `load_model()` in Keras 3. In order to reload a TensorFlow SavedModel as an inference-only layer in Keras 3, use `keras.layers.TFSMLayer(/home/user/.cache/huggingface/hub/models--mayaseale--Monkey_Image_Classifier/snapshots/eebcd0fe508db0820231e15168960c4bfa4c425c, call_endpoint='serving_default')` (note that your `call_endpoint` might have a different name).
