Commit ·
2bac082
1
Parent(s): eddffcf
Update app.py
Browse files82 unmodified lines8384858687888969 unmodified lines15916016116216316416582 unmodified lines@spaces.GPU(duration=120)def deidentify_doc(pdftext, maxtokens, temperature, top_probability):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]"# prompt = """# Perform the following actions on given report:69 unmodified lines)output = output['choices'][0]['message']['content']prompt = "Perform the following actions on given text: 1. Replace any person age with term [redacted] 2. DO NOT REPLACE ANY MEDICAL MEASUREMENTS 3. Replace only the CALENDAR DATES of format 'day/month/year' with term [redacted]"output = llm.create_chat_completion(messages=[{"role": "assistant", "content": prompt},82 unmodified lines8384858687888969 unmodified lines15916016116216316416582 unmodified lines@spaces.GPU(duration=120)def deidentify_doc(pdftext, maxtokens, temperature, top_probability):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]. Output the modified text."# prompt = """# Perform the following actions on given report:69 unmodified lines)output = output['choices'][0]['message']['content']prompt = "Perform the following actions on given text: 1. Replace any person age with term [redacted] 2. DO NOT REPLACE ANY MEDICAL MEASUREMENTS 3. Replace only the CALENDAR DATES of format 'day/month/year' with term [redacted]. Output the modified text."output = llm.create_chat_completion(messages=[{"role": "assistant", "content": prompt},
app.py+2-2