jwang2373 commited on
Commit
b66db26
1 Parent(s): d2a8c38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -29,9 +29,11 @@ h3 {
29
  """
30
 
31
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
 
32
 
33
  tokenizer = AutoTokenizer.from_pretrained(MODEL, trust_remote_code=True)
34
- model = AutoModelForCausalLM.from_pretrained(MODEL, torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
35
  model = model.eval()
36
 
37
  @spaces.GPU()
 
29
  """
30
 
31
  device = "cuda" if torch.cuda.is_available() else "cpu"
32
+ # Load the fine-tuned model configuration
33
+ config = AutoConfig.from_pretrained("jwang2373/UW-SBEL-ChronoPhi-4b-it")
34
 
35
  tokenizer = AutoTokenizer.from_pretrained(MODEL, trust_remote_code=True)
36
+ model = AutoModelForCausalLM.from_pretrained(MODEL, torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto",config=config)
37
  model = model.eval()
38
 
39
  @spaces.GPU()