Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def run_async(coro):
|
|
23 |
|
24 |
# Load lightweight text generation model
|
25 |
try:
|
26 |
-
generator = pipeline("text-generation", model="distilbert/distilgpt2", device="cpu")
|
27 |
except Exception as e:
|
28 |
print(f"Error loading model: {e}")
|
29 |
generator = None
|
|
|
23 |
|
24 |
# Load lightweight text generation model
|
25 |
try:
|
26 |
+
generator = pipeline("text-generation", model="distilbert/distilgpt2", device="cpu", pad_token_id=50256)
|
27 |
except Exception as e:
|
28 |
print(f"Error loading model: {e}")
|
29 |
generator = None
|