PierreJousselin commited on
Commit
ffc0be2
·
verified ·
1 Parent(s): a5b5282

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,9 +1,13 @@
1
  import gradio as gr
2
- from transformers import AutoModelForCausalLM, AutoTokenizer
 
3
 
4
  # Load the model and tokenizer from Hugging Face
5
  model_name = "PierreJousselin/lora_model" # Replace with your model's name or path
6
- model = AutoModelForCausalLM.from_pretrained(model_name)
 
 
 
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
 
9
  # Define the chat function
 
1
  import gradio as gr
2
+ from transformers import AutoTokenizer
3
+ from peft import AutoPeftModelForCausalLM
4
 
5
  # Load the model and tokenizer from Hugging Face
6
  model_name = "PierreJousselin/lora_model" # Replace with your model's name or path
7
+ model = AutoPeftModelForCausalLM.from_pretrained(
8
+ model_name,
9
+
10
+ )
11
  tokenizer = AutoTokenizer.from_pretrained(model_name)
12
 
13
  # Define the chat function