File size: 690 Bytes
f937044
 
 
 
 
 
 
 
 
 
 
6282e22
 
 
 
f937044
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)