null and void commited on
Commit
72a24d5
·
verified ·
1 Parent(s): fe47170

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -32,7 +32,7 @@ class ConversationManager:
32
  try:
33
  print(f"Attempting to load model: {model_name}")
34
  tokenizer = AutoTokenizer.from_pretrained(model_name)
35
- except:
36
  # Try to load the model with 8-bit quantization
37
  model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", load_in_8bit=True)
38
  except RuntimeError as e:
 
32
  try:
33
  print(f"Attempting to load model: {model_name}")
34
  tokenizer = AutoTokenizer.from_pretrained(model_name)
35
+ finally:
36
  # Try to load the model with 8-bit quantization
37
  model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", load_in_8bit=True)
38
  except RuntimeError as e: