memex-in commited on
Commit
e0b1184
·
verified ·
1 Parent(s): ac00c55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ 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
 
 
24
  try:
25
  # Create ASCII art from the image
26
  ascii_art = AsciiArt.from_image(image_path) # Create the AsciiArt object
27
+ return ascii_art.get_ascii() # Use the get_ascii() method to get the ASCII representation
28
  except Exception as e:
29
  raise Exception(f"Failed to convert image to ASCII: {e}")
30