Neon-AI commited on
Commit
3626da7
Β·
verified Β·
1 Parent(s): 29fe140

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -29,13 +29,15 @@ def load_model():
29
 
30
  base_model = AutoModelForCausalLM.from_pretrained(
31
  MODEL_ID,
32
- torch_dtype=torch.float32,
33
- device_map=None
34
  )
35
 
36
- # Load LoRA if present
37
  try:
38
- model = PeftModel.from_pretrained(base_model, MODEL_ID)
 
 
 
39
  except Exception:
40
  model = base_model
41
 
@@ -69,7 +71,7 @@ Rules:
69
  - Neutral β†’ neutral.
70
  - Serious β†’ serious.
71
  - Rude β†’ curt or dismissive.
72
- - Mirroring of emotions is very important and must be talen as priority
73
  - No enthusiasm by default.
74
  - No emojis unless the user uses them first.
75
  - Replies must be short (1–3 sentences).
 
29
 
30
  base_model = AutoModelForCausalLM.from_pretrained(
31
  MODEL_ID,
32
+ torch_dtype=torch.float32
 
33
  )
34
 
35
+ # Load LoRA from /lora if it exists
36
  try:
37
+ model = PeftModel.from_pretrained(
38
+ base_model,
39
+ f"{MODEL_ID}/lora"
40
+ )
41
  except Exception:
42
  model = base_model
43
 
 
71
  - Neutral β†’ neutral.
72
  - Serious β†’ serious.
73
  - Rude β†’ curt or dismissive.
74
+ - Mirroring of emotions is very important and myst be talen as priority
75
  - No enthusiasm by default.
76
  - No emojis unless the user uses them first.
77
  - Replies must be short (1–3 sentences).