awacke1 commited on
Commit
f937044
Β·
verified Β·
1 Parent(s): f9e1d84

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from datasets import load_dataset
3
+ import streamlit.components.v1 as components
4
+
5
+ # Load the dataset
6
+ dataset = load_dataset("awacke1/DatasetOfDatasetsUSA")
7
+
8
+ # Assuming the dataset has a column 'url' that contains the link to the datasets
9
+ # and a column 'title' for the text to display
10
+ links_html = "<ul>"
11
+ for item in dataset['train']: # Replace 'train' with the correct split if necessary
12
+ title = item['title']
13
+ url = item['url']
14
+ links_html += f"<li><a href='{url}' target='_blank'>{title}</a></li>"
15
+ links_html += "</ul>"
16
+
17
+ # Use Streamlit components to render the HTML
18
+ components.html(links_html)