from pyscript import document import pyodide_js await pyodide_js.loadPackage('pillow') await pyodide_js.loadPackage('numpy') from Calligramify import weight_calligram #Calligramify: #Transforms image and text string into HTML with font weights of text recreating images #Created with the aid of ChatGPT from PIL import Image import numpy as np import warnings warnings.filterwarnings("error") text_box = document.getElementById("text-portrait") matter = text_box.innerText print(matter) text_box.innerHTML = weight_calligram(r'working_copy/Dimitri_Headshot_mini.JPG',matter, font_ratio=1.2)