ysharma HF staff commited on
Commit
a3a62eb
1 Parent(s): e653440

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ HF_TOKEN = os.environ.get("HF_TOKEN", None)
8
 
9
  # Load the tokenizer and model
10
  tokenizer = GemmaTokenizer.from_pretrained("google/codegemma-7b-it")
11
- model = AutoModelForCausalLM.from_pretrained("google/codegemma-7b-it").to("cuda:0")
12
 
13
 
14
  def codegemma(message: str, history: list, temperature: float, max_new_tokens: int) -> str:
 
8
 
9
  # Load the tokenizer and model
10
  tokenizer = GemmaTokenizer.from_pretrained("google/codegemma-7b-it")
11
+ model = AutoModelForCausalLM.from_pretrained("google/codegemma-7b-it", device_map="auto") #.to("cuda:0")
12
 
13
 
14
  def codegemma(message: str, history: list, temperature: float, max_new_tokens: int) -> str: