newsranking / app.py
CSB261's picture
Update app.py
13e115d verified
raw
history blame
751 Bytes
import streamlit as st
import pandas as pd
# ์˜ˆ์‹œ ๋ฐ์ดํ„ฐํ”„๋ ˆ์ž„ (์‹ค์ œ ๋ฐ์ดํ„ฐ๋กœ ๊ต์ฒด)
df = pd.DataFrame({
'Rank': [1, 2, 3],
'Title': ['๋‰ด์Šค ์ œ๋ชฉ 1', '๋‰ด์Šค ์ œ๋ชฉ 2', '๋‰ด์Šค ์ œ๋ชฉ 3'],
'Link': ['https://news1.com', 'https://news2.com', 'https://news3.com'],
'Time': ['1์‹œ๊ฐ„ ์ „', '2์‹œ๊ฐ„ ์ „', '3์‹œ๊ฐ„ ์ „'],
'Image URL': ['https://example.com/image1.jpg', 'https://example.com/image2.jpg', 'https://example.com/image3.jpg']
})
st.title('Naver Ranking News')
# ๊ฐœ๋ณ„ ๋‰ด์Šค ํ•ญ๋ชฉ์„ ์ถœ๋ ฅ
for index, row in df.iterrows():
st.image(row['Image URL'], width=100)
st.markdown(f"**[{row['Title']}]({row['Link']})**")
st.write(f"Rank: {row['Rank']} | Time: {row['Time']}")
st.write("---")