vaniagrawal commited on
Commit
18f5172
·
verified ·
1 Parent(s): 9468aa0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_name, token=hf_token)
13
 
14
  def generate_code(prompt):
15
  batch_size = 10
16
- inputs = tokenizer(input_texts, return_tensors="pt", padding=True, truncation=True, max_length=512)
17
  outputs = model.generate(inputs['input_ids'], max_length=512, num_return_sequences=batch_size)
18
  code = tokenizer.decode(outputs[0], skip_special_tokens=True)
19
  return code
 
13
 
14
  def generate_code(prompt):
15
  batch_size = 10
16
+ inputs = tokenizer(prompt, return_tensors="pt", padding=True, truncation=True, max_length=512)
17
  outputs = model.generate(inputs['input_ids'], max_length=512, num_return_sequences=batch_size)
18
  code = tokenizer.decode(outputs[0], skip_special_tokens=True)
19
  return code