yasserrmd commited on
Commit
44aedcd
1 Parent(s): e1bed01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -21,7 +21,7 @@ pipe = pipeline(
21
 
22
  # Text generation function
23
  def generate_text(prompt):
24
- pipe.to('cuda')
25
  response = pipe(prompt, max_length=100, num_return_sequences=1)
26
  return response[0]['generated_text']
27
 
 
21
 
22
  # Text generation function
23
  def generate_text(prompt):
24
+ pipe.model.to('cuda')
25
  response = pipe(prompt, max_length=100, num_return_sequences=1)
26
  return response[0]['generated_text']
27