Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|