Update app.py
Browse files
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 |
-
|
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 |
-
|
21 |
-
return
|
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 |
|