Mitigate UnboundLocalError (#2136)

This commit is contained in:
Konstantin Gukov 2023-05-19 19:46:18 +02:00 committed by GitHub
parent 50c70e28f0
commit 1b52bddfcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,6 +291,7 @@ def generate_reply_custom(question, original_question, seed, state, eos_token=No
generate_params[k] = state[k]
t0 = time.time()
reply = ''
try:
if not is_chat:
yield ''