Update app.py
Browse files
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 |
|