File size: 854 Bytes
d96e79d 7d373bd d96e79d 7d373bd d96e79d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import gradio as gr
import requests
import pandas as pd
from gradio_huggingfacehub_search import HuggingfaceHubSearch
def analyze_dataset(dataset: str) -> pd.DataFrame:
yield f"Presidio scan results for {dataset}:", pd.DataFrame({"type": [], "text": [], "row_idx": [], "column_name": []})
iface = gr.Interface(
fn=analyze_dataset,
inputs=[
HuggingfaceHubSearch(
label="Hub Dataset ID",
placeholder="Search for dataset id on Huggingface",
search_type="dataset",
),
],
outputs=[
gr.Markdown(),
gr.DataFrame(),
],
title="Scan datasets using Presidio",
description="The space takes an HF dataset name as an input, and returns the list of entities detected by Presidio in the first samples.",
)
with gr.Blocks() as demo:
iface.render()
demo.launch()
|