customizable ascii art (#506)
Browse files- requirements.txt +1 -0
- scripts/finetune.py +7 -10
requirements.txt
CHANGED
|
@@ -24,3 +24,4 @@ rouge-score==0.1.2
|
|
| 24 |
scipy
|
| 25 |
scikit-learn==1.2.2
|
| 26 |
pynvml
|
|
|
|
|
|
| 24 |
scipy
|
| 25 |
scikit-learn==1.2.2
|
| 26 |
pynvml
|
| 27 |
+
art
|
scripts/finetune.py
CHANGED
|
@@ -16,6 +16,7 @@ import transformers
|
|
| 16 |
import yaml
|
| 17 |
|
| 18 |
# add src to the pythonpath so we don't need to pip install this
|
|
|
|
| 19 |
from optimum.bettertransformer import BetterTransformer
|
| 20 |
from transformers import GenerationConfig, TextStreamer
|
| 21 |
|
|
@@ -53,16 +54,12 @@ class TrainerCliArgs:
|
|
| 53 |
shard: bool = field(default=False)
|
| 54 |
|
| 55 |
|
| 56 |
-
def print_axolotl_text_art():
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
88. .88 .d88b. 88. .88 88 88. .88 88 88
|
| 63 |
-
`88888P8 dP' `dP `88888P' dP `88888P' dP dP
|
| 64 |
-
"""
|
| 65 |
-
|
| 66 |
if is_main_process():
|
| 67 |
print(ascii_art)
|
| 68 |
|
|
|
|
| 16 |
import yaml
|
| 17 |
|
| 18 |
# add src to the pythonpath so we don't need to pip install this
|
| 19 |
+
from art import text2art
|
| 20 |
from optimum.bettertransformer import BetterTransformer
|
| 21 |
from transformers import GenerationConfig, TextStreamer
|
| 22 |
|
|
|
|
| 54 |
shard: bool = field(default=False)
|
| 55 |
|
| 56 |
|
| 57 |
+
def print_axolotl_text_art(suffix=None):
|
| 58 |
+
font = "nancyj"
|
| 59 |
+
ascii_text = " axolotl"
|
| 60 |
+
if suffix:
|
| 61 |
+
ascii_text += f" x {suffix}"
|
| 62 |
+
ascii_art = text2art(" axolotl", font=font)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
if is_main_process():
|
| 64 |
print(ascii_art)
|
| 65 |
|