loubnabnl HF staff commited on
Commit
3996ded
·
1 Parent(s): 6e3059f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -19,7 +19,7 @@ example = [
19
  device="cuda:0"
20
  tokenizer = AutoTokenizer.from_pretrained("loubnabnl/santacoder-code-to-text")
21
  model = AutoModelForCausalLM.from_pretrained("loubnabnl/santacoder-code-to-text", trust_remote_code=True).to(device)
22
- pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device=device)
23
 
24
  def make_doctring(gen_prompt):
25
  return gen_prompt + f"\n\n\"\"\"\nExplanation:"
 
19
  device="cuda:0"
20
  tokenizer = AutoTokenizer.from_pretrained("loubnabnl/santacoder-code-to-text")
21
  model = AutoModelForCausalLM.from_pretrained("loubnabnl/santacoder-code-to-text", trust_remote_code=True).to(device)
22
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device=0)
23
 
24
  def make_doctring(gen_prompt):
25
  return gen_prompt + f"\n\n\"\"\"\nExplanation:"