Heit39 commited on
Commit
1cdb992
·
verified ·
1 Parent(s): 139f480

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -15,13 +15,14 @@ model_path = "Mat17892/t5small_enfr_opus"
15
 
16
  # Load tokenizer
17
  tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=True, legacy=False)
 
18
 
19
- # Load the base model (e.g., LLaMA)
20
- base_model = AutoModelForSeq2SeqLM.from_pretrained(base_model, token = os.getenv('huggingface_token'))
21
 
22
- # Load LoRA adapter
23
- from peft import PeftModel
24
- model = PeftModel.from_pretrained(base_model, model_path, token = os.getenv('huggingface_token'))
25
 
26
  def respond(
27
  message: str,
 
15
 
16
  # Load tokenizer
17
  tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=True, legacy=False)
18
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_path, token = os.getenv('huggingface_token'))
19
 
20
+ # # Load the base model (e.g., LLaMA)
21
+ # base_model = AutoModelForSeq2SeqLM.from_pretrained(base_model, token = os.getenv('huggingface_token'))
22
 
23
+ # # Load LoRA adapter
24
+ # from peft import PeftModel
25
+ # model = PeftModel.from_pretrained(base_model, model_path, token = os.getenv('huggingface_token'))
26
 
27
  def respond(
28
  message: str,