Spaces:
Sleeping
Sleeping
Commit
·
1762fcc
1
Parent(s):
672db5d
update
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def extract_pii(text):
|
|
28 |
pii_entities = res.json()["results"]["documents"][0]["entities"]
|
29 |
return list(map(lambda row: [row["text"], row["category"], row["confidenceScore"]], pii_entities))
|
30 |
|
31 |
-
demo = gr.Interface(extract_pii, inputs="
|
32 |
|
33 |
if __name__ == "__main__":
|
34 |
demo.launch()
|
|
|
28 |
pii_entities = res.json()["results"]["documents"][0]["entities"]
|
29 |
return list(map(lambda row: [row["text"], row["category"], row["confidenceScore"]], pii_entities))
|
30 |
|
31 |
+
demo = gr.Interface(extract_pii, inputs=gr.Textbox(label="Text for PII extraction"), outputs=gr.DataFrame(headers=["Text", "Category", "Confidence Score"]))
|
32 |
|
33 |
if __name__ == "__main__":
|
34 |
demo.launch()
|