Fix server refusing to close on Ctrl+C

This commit is contained in:
oobabooga 2023-12-12 12:27:40 -08:00
parent 39d2fe1ed9
commit 736fe4aa3e

View File

@ -58,9 +58,6 @@ from modules.utils import gradio
def signal_handler(sig, frame): def signal_handler(sig, frame):
logger.info("Received Ctrl+C. Shutting down Text generation web UI gracefully.") logger.info("Received Ctrl+C. Shutting down Text generation web UI gracefully.")
if 'interface' in shared.gradio:
shared.gradio['interface'].close()
sys.exit(0) sys.exit(0)