johnnymullaney commited on
Commit
1407c86
·
1 Parent(s): 8255195

Fix model loading to use Hugging Face Hub repo ID

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from transformers import AutoTokenizer, AutoModelForCausalLM
3
 
4
  # Load the fine-tuned model and tokenizer
5
- model_name = "./fine-tuned-distilgpt2" # Path to the saved fine-tuned model
6
 
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
  model = AutoModelForCausalLM.from_pretrained(model_name)
 
2
  from transformers import AutoTokenizer, AutoModelForCausalLM
3
 
4
  # Load the fine-tuned model and tokenizer
5
+ model_name = "johnnymullaney/fine-tuned-distilgpt2-books" # Path to the saved fine-tuned model
6
 
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
  model = AutoModelForCausalLM.from_pretrained(model_name)