Spaces:
Sleeping
Sleeping
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 | |
title = item['linkType'] | |
url = item['link'] | |
links_html += f"<li><a href='{link}' target='_blank'>{cityOrState}</a></li>" | |
links_html += "</ul>" | |
# Use Streamlit components to render the HTML | |
components.html(links_html) | |