Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,6 @@ from io import BytesIO
|
|
| 4 |
import pandas as pd
|
| 5 |
from selenium import webdriver
|
| 6 |
from selenium.common.exceptions import WebDriverException
|
| 7 |
-
from PIL import Image
|
| 8 |
from io import BytesIO
|
| 9 |
from bs4 import BeautifulSoup
|
| 10 |
|
|
@@ -29,11 +28,11 @@ def visualize(url):
|
|
| 29 |
#st.subheader("Website title:")
|
| 30 |
if xdataframe:
|
| 31 |
#st.info(html_content)
|
| 32 |
-
st.code(xdataframe, language='html')
|
| 33 |
# Konversi tabel HTML ke DataFrame Pandas
|
| 34 |
#df = pd.read_html(str(parse_element))[0]
|
| 35 |
#st.dataframe(df) # tampilkan tabel dengan format rapi Streamlit
|
| 36 |
-
|
| 37 |
# === 6. Tampilkan di Streamlit ===
|
| 38 |
#st.dataframe(xdataframe)
|
| 39 |
else:
|
|
|
|
| 4 |
import pandas as pd
|
| 5 |
from selenium import webdriver
|
| 6 |
from selenium.common.exceptions import WebDriverException
|
|
|
|
| 7 |
from io import BytesIO
|
| 8 |
from bs4 import BeautifulSoup
|
| 9 |
|
|
|
|
| 28 |
#st.subheader("Website title:")
|
| 29 |
if xdataframe:
|
| 30 |
#st.info(html_content)
|
| 31 |
+
#st.code(xdataframe, language='html')
|
| 32 |
# Konversi tabel HTML ke DataFrame Pandas
|
| 33 |
#df = pd.read_html(str(parse_element))[0]
|
| 34 |
#st.dataframe(df) # tampilkan tabel dengan format rapi Streamlit
|
| 35 |
+
st.components.v1.html(str(xdataframe), height=600, scrolling=True)
|
| 36 |
# === 6. Tampilkan di Streamlit ===
|
| 37 |
#st.dataframe(xdataframe)
|
| 38 |
else:
|