awacke1's picture
Update app.py
6282e22 verified
raw
history blame
690 Bytes
import streamlit as st
from datasets import load_dataset
import streamlit.components.v1 as components
# Load the dataset
dataset = load_dataset("awacke1/DatasetOfDatasetsUSA")
# Assuming the dataset has a column 'url' that contains the link to the datasets
# and a column 'title' for the text to display
links_html = "<ul>"
for item in dataset['train']: # Replace 'train' with the correct split if necessary
cityOrState=item['cityOrState']
link=item['link']
linkType=item['linkType']
links_html += f"<li><a href='{link}' target='_blank'>{cityOrState} - {linkType}</a></li>"
links_html += "</ul>"
# Use Streamlit components to render the HTML
components.html(links_html)