AliEssa555 commited on
Commit
5495567
·
verified ·
1 Parent(s): a544069

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -2,13 +2,12 @@ import gradio as gr
2
  import torch
3
  from transformers import AutoModelForCausalLM, AutoTokenizer
4
 
5
- # Load your model and tokenizer
6
  from peft import PeftModel, PeftConfig
7
  from transformers import AutoModelForCausalLM
8
 
9
  config = PeftConfig.from_pretrained("AliEssa555/latest-podcast-model-ft")
10
  base_model = AutoModelForCausalLM.from_pretrained("TheBloke/Mistral-7B-Instruct-v0.2-GPTQ")
11
- model_name = PeftModel.from_pretrained(base_model, "AliEssa555/latest-podcast-model-ft")
12
 
13
  #model_name = "path_to_your_fine_tuned_model" # Use the local path or the Hugging Face model hub ID if published
14
  model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16)
 
2
  import torch
3
  from transformers import AutoModelForCausalLM, AutoTokenizer
4
 
 
5
  from peft import PeftModel, PeftConfig
6
  from transformers import AutoModelForCausalLM
7
 
8
  config = PeftConfig.from_pretrained("AliEssa555/latest-podcast-model-ft")
9
  base_model = AutoModelForCausalLM.from_pretrained("TheBloke/Mistral-7B-Instruct-v0.2-GPTQ")
10
+ model = PeftModel.from_pretrained(base_model, "AliEssa555/latest-podcast-model-ft")
11
 
12
  #model_name = "path_to_your_fine_tuned_model" # Use the local path or the Hugging Face model hub ID if published
13
  model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16)