Skip to content

Commit

Permalink
Gracefully shutdown the app
Browse files Browse the repository at this point in the history
  • Loading branch information
iamaziz committed Dec 23, 2023
1 parent 4f36012 commit 6d79d10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ollachat/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ def run_streamlit():
chatbot_path = os.path.join(dir_path, 'chatbot.py')

# Run the command
subprocess.run(["streamlit", "run", chatbot_path])
try:
subprocess.run(["streamlit", "run", chatbot_path])
except KeyboardInterrupt:
print("Shutting down the Streamlit app...")
exit(0)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="st_ollama",
version="0.1",
version="0.1.1",
author="Aziz Alto",
author_email="iamaziz.alto@gmail.com",
description="A Streamlit chatbot app integrating Ollama LLMs",
Expand Down

0 comments on commit 6d79d10

Please # to comment.