wannaphong commited on
Commit
52cffa7
1 Parent(s): eaf516b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_
16
 
17
  @spaces.GPU
18
  def generate_text(prompt, max_length, top_p, top_k):
19
- inputs = tokenizer([prompt], return_tensors="pt")
20
 
21
  generate_kwargs = dict(
22
  inputs,
 
16
 
17
  @spaces.GPU
18
  def generate_text(prompt, max_length, top_p, top_k):
19
+ inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
20
 
21
  generate_kwargs = dict(
22
  inputs,