print(f"File size: {os.path.getsize('/tmp/Barlow-Regular.ttf')} bytes") else: print("File does not exist in the /tmp directory.")And now just register it in Matplotlib as below: from matplotlib import font_manager font_path = "/tmp/Barlow-Regular.ttf" font_manager.fontManager.addfo...
import matplotlib.font_manager as fm import argparse from sentence_transformers import SentenceTransformer, util from utils import get_outputs plt.figure(figsize=(10, 7.5)) plt.rcParams['font.size'] = 26 font_path = '/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf' font_prop = ...