Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,8 +23,8 @@ def capture_screenshot(url, output_path='screenshot.png'):
|
|
23 |
def convert_to_ascii(image_path):
|
24 |
try:
|
25 |
# Create ASCII art from the image
|
26 |
-
ascii_art = AsciiArt.from_image(image_path) #
|
27 |
-
return str(ascii_art) # Convert to string
|
28 |
except Exception as e:
|
29 |
raise Exception(f"Failed to convert image to ASCII: {e}")
|
30 |
|
|
|
23 |
def convert_to_ascii(image_path):
|
24 |
try:
|
25 |
# Create ASCII art from the image
|
26 |
+
ascii_art = AsciiArt.from_image(image_path) # Create the AsciiArt object
|
27 |
+
return str(ascii_art) # Convert the AsciiArt object to a string
|
28 |
except Exception as e:
|
29 |
raise Exception(f"Failed to convert image to ASCII: {e}")
|
30 |
|