Spaces:
Runtime error
Runtime error
File size: 1,023 Bytes
a63752b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import os
from PIL import Image
def system_run():
caption = """
__ / || \
| | / / \ \
| | / / \ \
| | / /______\ \
| | / / \ \
| | / / \ \
| |_________ / / \ \
|____________|/ / \ \
"""
img = Image.open("image.jpg") #process the image
if img.height > 300 or img.width > 300: #get the height and width of the image
output_size = (900, 900) #crop the image to the output size
img.thumbnail(output_size)
ext = ['.jpeg', '.png', '.jpg'] #create list of extensions to save as
for extension in ext: #loop over the list
img.save(f"image_resize{extension}")
os.system('python3 text_extraction.py')
os.system('python3 detect_language.py')
#os.system('python3 load_text.py')
#os.system('python3 display_lang.py')
# os.system('python3 language_detection.py')
system_run() |