THEODOROS commited on
Commit
1d25a7a
·
1 Parent(s): 4c4b76e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -94,7 +94,7 @@ def prompt_to_layout(user_prompt, intensity, fpath=None):
94
 
95
  top_p, top_k = creativity(intensity)
96
  model_prompt = '[User prompt] {} [Layout]'.format(user_prompt)
97
- input_ids = tokenizer(model_prompt, return_tensors='pt')
98
  output = finetuned.generate(**input_ids, do_sample=True, top_p=top_p, top_k=top_k,
99
  eos_token_id=50256, max_length=400)
100
  output = tokenizer.batch_decode(output, skip_special_tokens=True)
 
94
 
95
  top_p, top_k = creativity(intensity)
96
  model_prompt = '[User prompt] {} [Layout]'.format(user_prompt)
97
+ input_ids = tokenizer(model_prompt, return_tensors='pt').to(device)
98
  output = finetuned.generate(**input_ids, do_sample=True, top_p=top_p, top_k=top_k,
99
  eos_token_id=50256, max_length=400)
100
  output = tokenizer.batch_decode(output, skip_special_tokens=True)