diff --git a/src/cli_demo.py b/src/cli_demo.py index fe6a0bc4..cccda517 100644 --- a/src/cli_demo.py +++ b/src/cli_demo.py @@ -1,6 +1,12 @@ -import readline from llmtuner import ChatModel +try: + import platform + if platform.system() != "Windows": + import readline +except ImportError: + print("Install `readline` for a better experience.") + def main(): chat_model = ChatModel()