memex-in commited on
Commit
4a92538
·
verified ·
1 Parent(s): be55beb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,7 +2,7 @@ import os
2
  import streamlit as st
3
  from selenium import webdriver
4
  from selenium.webdriver.chrome.options import Options
5
- from ascii_magic import AsciiArt
6
 
7
  def capture_screenshot(url, output_path='screenshot.png'):
8
  chrome_options = Options()
@@ -17,8 +17,8 @@ def capture_screenshot(url, output_path='screenshot.png'):
17
  driver.quit()
18
 
19
  def convert_to_ascii(image_path):
20
- ascii_art = AsciiArt.from_image(image_path)
21
- return ascii_art.to_string(columns=100, monochrome=True)
22
 
23
  st.title("ASCII Web Screenshot Viewer")
24
 
 
2
  import streamlit as st
3
  from selenium import webdriver
4
  from selenium.webdriver.chrome.options import Options
5
+ import ascii_magic
6
 
7
  def capture_screenshot(url, output_path='screenshot.png'):
8
  chrome_options = Options()
 
17
  driver.quit()
18
 
19
  def convert_to_ascii(image_path):
20
+ output = ascii_magic.from_image_path(image_path, columns=100, mode=ascii_magic.Modes.ASCII)
21
+ return str(output)
22
 
23
  st.title("ASCII Web Screenshot Viewer")
24