Commit ·
fae1c05
1
Parent(s): ec90eeb
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,12 +83,16 @@ def txt_to_html(text):
|
|
| 83 |
@spaces.GPU(duration=120)
|
| 84 |
def deidentify_doc(pdftext, maxtokens, temperature, top_probability):
|
| 85 |
# prompt = "In the following text replace any person name and any address with term [redacted], replace any Date of Birth and NHS number with term [redacted]"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
prompt = """
|
| 87 |
-
|
| 88 |
-
1. Replace any person names, age, date of birth, gender with term [redacted]
|
| 89 |
-
2. Replace any addresses with term [redacted]
|
| 90 |
-
3. DO NOT REPLACE ANY MEDICAL MEASUREMENTS
|
| 91 |
-
4. Replace only the CALENDAR DATES of format 'day/month/year' with term [redacted]
|
| 92 |
"""
|
| 93 |
|
| 94 |
# model_id = "models/Meta-Llama-3-70B-Instruct-Q3_K_M.gguf"
|
|
|
|
| 83 |
@spaces.GPU(duration=120)
|
| 84 |
def deidentify_doc(pdftext, maxtokens, temperature, top_probability):
|
| 85 |
# prompt = "In the following text replace any person name and any address with term [redacted], replace any Date of Birth and NHS number with term [redacted]"
|
| 86 |
+
# prompt = """
|
| 87 |
+
# Perform the following actions on given report:
|
| 88 |
+
# 1. Replace any person names, age, date of birth, gender with term [redacted]
|
| 89 |
+
# 2. Replace any addresses with term [redacted]
|
| 90 |
+
# 3. DO NOT REPLACE ANY MEDICAL MEASUREMENTS
|
| 91 |
+
# 4. Replace only the CALENDAR DATES of format 'day/month/year' with term [redacted]
|
| 92 |
+
# """
|
| 93 |
+
|
| 94 |
prompt = """
|
| 95 |
+
Anonymize the following report
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
"""
|
| 97 |
|
| 98 |
# model_id = "models/Meta-Llama-3-70B-Instruct-Q3_K_M.gguf"
|