Commit ·
0d028f2
1
Parent(s): abd69e3
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,6 +80,10 @@ def deidentify_doc(pdftext="", maxtokens=600, temperature=1.2, top_probability=0
|
|
| 80 |
)
|
| 81 |
output = output['choices'][0]['message']['content']
|
| 82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
prompt = "Perform the following actions on given text: 1. Replace NHS number and Case note number and Date of Birth with term [redacted] 2. DO NOT REPLACE ANY MEDICAL MEASUREMENTS 3. Replace only the CALENDAR DATES of format 'day/month/year' with term [redacted]"
|
| 84 |
output = model.create_chat_completion(
|
| 85 |
messages=[
|
|
@@ -94,6 +98,10 @@ def deidentify_doc(pdftext="", maxtokens=600, temperature=1.2, top_probability=0
|
|
| 94 |
)
|
| 95 |
output = output['choices'][0]['message']['content']
|
| 96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
return output
|
| 98 |
|
| 99 |
@spaces.GPU(duration=120)
|
|
|
|
| 80 |
)
|
| 81 |
output = output['choices'][0]['message']['content']
|
| 82 |
|
| 83 |
+
print(prompt)
|
| 84 |
+
print(output)
|
| 85 |
+
print('-------------------------------------------------------')
|
| 86 |
+
|
| 87 |
prompt = "Perform the following actions on given text: 1. Replace NHS number and Case note number and Date of Birth with term [redacted] 2. DO NOT REPLACE ANY MEDICAL MEASUREMENTS 3. Replace only the CALENDAR DATES of format 'day/month/year' with term [redacted]"
|
| 88 |
output = model.create_chat_completion(
|
| 89 |
messages=[
|
|
|
|
| 98 |
)
|
| 99 |
output = output['choices'][0]['message']['content']
|
| 100 |
|
| 101 |
+
print(prompt)
|
| 102 |
+
print(output)
|
| 103 |
+
print('-------------------------------------------------------')
|
| 104 |
+
|
| 105 |
return output
|
| 106 |
|
| 107 |
@spaces.GPU(duration=120)
|