Spaces:
Sleeping
Sleeping
Commit
·
672db5d
1
Parent(s):
cf44933
add headers
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="textbox", outputs="
|
| 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="textbox", outputs=gr.DataFrame(headers=["Text", "Category", "Confidence Score"]))
|
| 32 |
|
| 33 |
if __name__ == "__main__":
|
| 34 |
demo.launch()
|