# Not able to use the uploaded model in Hugginface

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnot-able-to-use-the-uploaded-model-in-hugginface%2F102946%3E%5C
**Category:** Beginners\
**Created:** [August 19, 2024, 8:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnot-able-to-use-the-uploaded-model-in-hugginface%2F102946 "2024-08-19T08:19:12Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mahmutc](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mahmutc/32/64626_2.png) [@mahmutc](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmahmutc)%5C
**Post date:** [August 19, 2024, 9:15am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnot-able-to-use-the-uploaded-model-in-hugginface%2F102946%2F6 "2024-08-19T09:15:50Z")

</div>

quoting from [How to create a config.json after saving a model - #4 by BramVanroy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-create-a-config-json-after-saving-a-model%2F10459%2F4)

instead of

```auto
class modelWithLossFunc(nn.Module):

```

use

```auto
from transformers.modeling_utils import PreTrainedModel
class modelWithLossFunc(PreTrainedModel):

```

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnot-able-to-use-the-uploaded-model-in-hugginface%2F102946)._
