# How can I adapt this code to deploy it in HuggingFace?

**URL:** <https://discuss.huggingface.co/t/how-can-i-adapt-this-code-to-deploy-it-in-huggingface/54351>\
**Category:** Beginners\
**Created:** [September 10, 2023, 10:41pm UTC](https://discuss.huggingface.co/t/how-can-i-adapt-this-code-to-deploy-it-in-huggingface/54351 "2023-09-10T22:41:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanovishado](https://avatars.discourse-cdn.com/v4/letter/i/439d5e/32.png) [@ivanovishado](https://discuss.huggingface.co/u/ivanovishado)\
**Post date:** [September 10, 2023, 10:41pm UTC](https://discuss.huggingface.co/t/how-can-i-adapt-this-code-to-deploy-it-in-huggingface/54351/1 "2023-09-10T22:41:16Z")

</div>

Hi, all.

I’d like to know how to adapt the following code so that it can take advantage of the HuggingFace libraries and I can upload the model to the Hub more easily and can make use of the Inference API that’s provided for free.

I used to have this custom fine-tuned model providing predictions running on AWS SageMaker but I’d like to explore other alternatives on how to run it.

The code can be found [here](https://github.com/violentometro-online-team/violentometro-online/blob/master/6.%20Deep%20Learning/Violentometro.ipynb).

I’ll appreciate any help!
