gnosticdev commited on
Commit
993dccc
·
verified ·
1 Parent(s): 46aa7c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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