Straive-Kripa commited on
Commit
3bfd7f7
·
verified ·
1 Parent(s): 49cfc9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
  import spacy
3
  import re
 
4
 
5
  # Load the spaCy model, confirm that additional download has been made
6
  nlp = spacy.load("en_core_web_sm")
@@ -61,11 +62,15 @@ def anonymize_text_including_proper_nouns_and_addresses(text):
61
 
62
  return anonymized_text
63
 
64
-
 
 
 
65
  demo = gr.Interface(
66
  fn=anonymize_text_including_proper_nouns_and_addresses,
67
  inputs=["text"],
68
  outputs=["text"],
 
69
  )
70
 
71
  demo.launch()
 
1
  import gradio as gr
2
  import spacy
3
  import re
4
+ from collections import Counter
5
 
6
  # Load the spaCy model, confirm that additional download has been made
7
  nlp = spacy.load("en_core_web_sm")
 
62
 
63
  return anonymized_text
64
 
65
+ dummy_text = """
66
+ Contact John Doe at 123-456-7890, visit example.com or [email protected].
67
+ My SSN is 123-45-6789. Meet me at 123 Gary Crant, in Casablanca
68
+ """
69
  demo = gr.Interface(
70
  fn=anonymize_text_including_proper_nouns_and_addresses,
71
  inputs=["text"],
72
  outputs=["text"],
73
+ examples=[[dummy_text]]
74
  )
75
 
76
  demo.launch()