Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
|
5 |
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
|
6 |
|
7 |
-
pipe = pipeline("text-generation", model="
|
8 |
|
9 |
def generate_poem(text):
|
10 |
res = pipe(text)[0]["generated_text"]
|
|
|
4 |
|
5 |
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
|
6 |
|
7 |
+
pipe = pipeline("text-generation", model="poem_generator3", device=device)
|
8 |
|
9 |
def generate_poem(text):
|
10 |
res = pipe(text)[0]["generated_text"]
|