lcbwhite commited on
Commit
957272e
·
verified ·
1 Parent(s): 44d201f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -4,7 +4,11 @@ from transformers import AutoModelForCausalLM
4
 
5
  def LMmodel(message, history):
6
  base_model_id="LeoLM/leo-mistral-hessianai-7b-chat"
7
- base_model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto",trust_remote_code=True)
 
 
 
 
8
  return "works"
9
 
10
 
 
4
 
5
  def LMmodel(message, history):
6
  base_model_id="LeoLM/leo-mistral-hessianai-7b-chat"
7
+ try:
8
+ base_model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto",trust_remote_code=True)
9
+ except Exception as e:
10
+ exp = str(e)
11
+ return exp
12
  return "works"
13
 
14