# How to load local models

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-local-models%2F57033%3E%5C
**Category:** 🔒 Gradio\
**Created:** [October 2, 2023, 12:20am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-local-models%2F57033 "2023-10-02T00:20:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![seunghon](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@seunghon](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fseunghon)%5C
**Post date:** [October 2, 2023, 12:20am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-local-models%2F57033%2F1 "2023-10-02T00:20:46Z")

</div>

Hello.

I looked through the tutorial pages on [https://www.gradio.app/](https://www.gradio.app/).

It seems to me that gradio can launch the app with the models from huggingface.

Is it possible to load the model stored in local machine? If possible, could you tell me how to?

---

<div class="post-metadata">

**Author:** ![vhpvmx](https://avatars.discourse-cdn.com/v4/letter/v/3ab097/32.png) [@vhpvmx](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fvhpvmx)%5C
**Post date:** [October 13, 2023, 4:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-local-models%2F57033%2F2 "2023-10-13T16:56:05Z")

</div>

I just solved, here an example:

import gradio as gr  
from transformers import pipeline

model=“./models/mt5-small-finetuned-amazon-en-es”  
summarizer = pipeline(“summarization”, model)

def summary(text):  
return summarizer(text)[0][“summary\_text”]

with gr.Blocks() as demo:  
input\_text = gr.Textbox(placeholder=“Ingresa la reseña del libro…”, lines=4)  
output\_text = gr.Textbox(label=“Resumen”)  
btn = gr.Button(“Genera el resumen”)

```
btn.click(summary, input_text, output_text)

```

demo.launch()
