loubnabnl HF staff commited on
Commit
c289edf
·
1 Parent(s): 1e12d30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -25,10 +25,10 @@ example = [
25
  [EXAMPLE_5, 32, 0.6, 42],
26
  ]
27
 
28
- device="cuda:0"
29
  tokenizer = AutoTokenizer.from_pretrained("loubnabnl/santacoder-code-to-text")
30
- model = AutoModelForCausalLM.from_pretrained("loubnabnl/santacoder-code-to-text", trust_remote_code=True).to(device)
31
- pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device=0)
32
 
33
  def make_doctring(gen_prompt):
34
  return gen_prompt + f"\n\n\"\"\"\nExplanation:"
 
25
  [EXAMPLE_5, 32, 0.6, 42],
26
  ]
27
 
28
+
29
  tokenizer = AutoTokenizer.from_pretrained("loubnabnl/santacoder-code-to-text")
30
+ model = AutoModelForCausalLM.from_pretrained("loubnabnl/santacoder-code-to-text", trust_remote_code=True)
31
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
32
 
33
  def make_doctring(gen_prompt):
34
  return gen_prompt + f"\n\n\"\"\"\nExplanation:"