parent
8fe3de4db2
commit
4dcad750c5
@ -1,21 +1,21 @@
|
||||
boto3==1.36.8
|
||||
botocore==1.36.8
|
||||
boto3==1.42.94
|
||||
botocore==1.42.94
|
||||
gTTS==2.5.4
|
||||
moviepy==2.2.1
|
||||
playwright==1.49.1
|
||||
playwright==1.58.0
|
||||
praw==7.8.1
|
||||
requests==2.32.3
|
||||
rich==13.9.4
|
||||
requests==2.32.5
|
||||
rich==15.0.0
|
||||
toml==0.10.2
|
||||
translators==5.9.9
|
||||
pyttsx3==2.98
|
||||
tomlkit==0.13.2
|
||||
Flask==3.1.1
|
||||
tomlkit==0.14.0
|
||||
Flask==3.1.3
|
||||
clean-text==0.6.0
|
||||
unidecode==1.4.0
|
||||
spacy==3.8.7
|
||||
torch==2.7.0
|
||||
transformers==4.52.4
|
||||
torch==2.11.0
|
||||
transformers==4.57.6
|
||||
# spacy==3.8.7 # Optional: only for advanced text parsing (not yet Python 3.14 compatible)
|
||||
ffmpeg-python==0.2.0
|
||||
elevenlabs==1.57.0
|
||||
elevenlabs==2.44.0
|
||||
yt-dlp==2025.10.14
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
from typing import Union
|
||||
from PIL.ImageFont import FreeTypeFont, ImageFont
|
||||
|
||||
|
||||
def getsize(font: ImageFont | FreeTypeFont, text: str):
|
||||
def getsize(font: Union[ImageFont, FreeTypeFont], text: str):
|
||||
left, top, right, bottom = font.getbbox(text)
|
||||
width = right - left
|
||||
height = bottom - top
|
||||
return width, height
|
||||
|
||||
|
||||
def getheight(font: ImageFont | FreeTypeFont, text: str):
|
||||
def getheight(font: Union[ImageFont, FreeTypeFont], text: str):
|
||||
_, height = getsize(font, text)
|
||||
return height
|
||||
|
||||
Loading…
Reference in new issue