hanzla commited on
Commit
2cf380d
·
verified ·
1 Parent(s): 8503060

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,7 +32,7 @@ try:
32
  model = AutoModelForCausalLM.from_pretrained(
33
  repo_name,
34
  device_map="auto",
35
- torch_dtype=torch.float16,
36
  )
37
  except Exception as e:
38
  print(f"Error loading model with GPU: {e}")
@@ -59,7 +59,7 @@ def generate_response(message, history):
59
  return "Sorry, the model could not be loaded. Please check the logs."
60
 
61
  messages = [
62
- {"role": "system", "content": "You are a helpful assistant. You think loud before answering anything"},
63
  ]
64
 
65
  # Add chat history to messages
 
32
  model = AutoModelForCausalLM.from_pretrained(
33
  repo_name,
34
  device_map="auto",
35
+ torch_dtype=torch.bfloat16,
36
  )
37
  except Exception as e:
38
  print(f"Error loading model with GPU: {e}")
 
59
  return "Sorry, the model could not be loaded. Please check the logs."
60
 
61
  messages = [
62
+ {"role": "system", "content": "You are a helpful assistant. You think out loud before answering anything"},
63
  ]
64
 
65
  # Add chat history to messages