customizable ascii art (#506)
This commit is contained in:
@@ -24,3 +24,4 @@ rouge-score==0.1.2
|
|||||||
scipy
|
scipy
|
||||||
scikit-learn==1.2.2
|
scikit-learn==1.2.2
|
||||||
pynvml
|
pynvml
|
||||||
|
art
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import transformers
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
# add src to the pythonpath so we don't need to pip install this
|
# add src to the pythonpath so we don't need to pip install this
|
||||||
|
from art import text2art
|
||||||
from optimum.bettertransformer import BetterTransformer
|
from optimum.bettertransformer import BetterTransformer
|
||||||
from transformers import GenerationConfig, TextStreamer
|
from transformers import GenerationConfig, TextStreamer
|
||||||
|
|
||||||
@@ -53,16 +54,12 @@ class TrainerCliArgs:
|
|||||||
shard: bool = field(default=False)
|
shard: bool = field(default=False)
|
||||||
|
|
||||||
|
|
||||||
def print_axolotl_text_art():
|
def print_axolotl_text_art(suffix=None):
|
||||||
ascii_art = """
|
font = "nancyj"
|
||||||
dP dP dP
|
ascii_text = " axolotl"
|
||||||
88 88 88
|
if suffix:
|
||||||
.d8888b. dP. .dP .d8888b. 88 .d8888b. d8888P 88
|
ascii_text += f" x {suffix}"
|
||||||
88' `88 `8bd8' 88' `88 88 88' `88 88 88
|
ascii_art = text2art(" axolotl", font=font)
|
||||||
88. .88 .d88b. 88. .88 88 88. .88 88 88
|
|
||||||
`88888P8 dP' `dP `88888P' dP `88888P' dP dP
|
|
||||||
"""
|
|
||||||
|
|
||||||
if is_main_process():
|
if is_main_process():
|
||||||
print(ascii_art)
|
print(ascii_art)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user