Spaces:
Runtime error
Runtime error
fix examples
Browse files
app.py
CHANGED
|
@@ -56,7 +56,8 @@ def analyze_dataset(dataset: str) -> pd.DataFrame:
|
|
| 56 |
yield f"⚙️ Scanning {dataset} [{rows.next_idx}/{num_rows} rows]:", pd.DataFrame(presidio_entities)
|
| 57 |
yield f"✅ Scanning {dataset} [{rows.next_idx}/{num_rows}rows]:", pd.DataFrame(presidio_entities)
|
| 58 |
|
| 59 |
-
with gr.Blocks(
|
|
|
|
| 60 |
gr.Markdown("The space takes an HF dataset name as an input, and returns the list of entities detected by Presidio in the first samples.")
|
| 61 |
inputs = [
|
| 62 |
HuggingfaceHubSearch(
|
|
@@ -71,6 +72,6 @@ with gr.Blocks(title="Scan datasets using Presidio") as demo:
|
|
| 71 |
gr.DataFrame(),
|
| 72 |
]
|
| 73 |
button.click(analyze_dataset, inputs, outputs)
|
| 74 |
-
gr.Examples([["microsoft/orca-math-word-problems-200k", "tatsu-lab/alpaca", "Anthropic/hh-rlhf", "OpenAssistant/oasst1"]], inputs, outputs, fn=analyze_dataset, run_on_click=True)
|
| 75 |
|
| 76 |
demo.launch()
|
|
|
|
| 56 |
yield f"⚙️ Scanning {dataset} [{rows.next_idx}/{num_rows} rows]:", pd.DataFrame(presidio_entities)
|
| 57 |
yield f"✅ Scanning {dataset} [{rows.next_idx}/{num_rows}rows]:", pd.DataFrame(presidio_entities)
|
| 58 |
|
| 59 |
+
with gr.Blocks() as demo:
|
| 60 |
+
gr.Markdown("# Scan datasets using Presidio")
|
| 61 |
gr.Markdown("The space takes an HF dataset name as an input, and returns the list of entities detected by Presidio in the first samples.")
|
| 62 |
inputs = [
|
| 63 |
HuggingfaceHubSearch(
|
|
|
|
| 72 |
gr.DataFrame(),
|
| 73 |
]
|
| 74 |
button.click(analyze_dataset, inputs, outputs)
|
| 75 |
+
gr.Examples([["microsoft/orca-math-word-problems-200k"], ["tatsu-lab/alpaca"], ["Anthropic/hh-rlhf"], ["OpenAssistant/oasst1"]], inputs, outputs, fn=analyze_dataset, run_on_click=True)
|
| 76 |
|
| 77 |
demo.launch()
|