Stability-AI / StableLM

StableLM: Stability AI Language Models
Apache License 2.0
15.85k stars 1.04k forks source link

Optimize cprint function using dictionary #58

Closed AndresCdo closed 1 year ago

AndresCdo commented 1 year ago

Background:

The current implementation of the cprint function in Python has multiple if-elif statements to set the color of the output. This can be improved by using a dictionary to store the color codes, resulting in a more concise and maintainable code.

Changes: