# Loading Transformer Pretrained Model via URL

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-transformer-pretrained-model-via-url%2F10362%3E%5C
**Category:** Beginners\
**Created:** [September 28, 2021, 3:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-transformer-pretrained-model-via-url%2F10362 "2021-09-28T15:39:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mordeecai](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mordeecai/32/2797_2.png) [@mordeecai](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmordeecai)%5C
**Post date:** [September 28, 2021, 3:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Floading-transformer-pretrained-model-via-url%2F10362%2F1 "2021-09-28T15:39:06Z")

</div>

Hi,

I uploaded a pretrained model into a web server. When loading a transformer pretrained model via URL as described in this API documentation:

> **[Models](https://huggingface.co/docs/transformers/main_classes/model)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

I still get invalid model telling me that the parameter must be a valid file path or a huggingface model id. How to properly load a pretrained model using a URL from a web server?

Thank you!
