SUPERpuper commited on
Commit
3534a12
·
1 Parent(s): 77e104d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -0,0 +1 @@
 
 
1
+ import requests from PIL import Image def convert_text_to_image(text): # Try to find an image file that contains the text image_url = 'https://example.com/image.jpg' try: response = requests.get(image_url) image = Image.open(response.content) return image except: return None #Prompt the user to input a text text = input('Enter the text to convert to an image:') # Try to convert the text to an image if convert_text_to_image(text): print('The text was converted to an image!') else: print('The text could not be converted to an image.')