Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
monk1337 authored Jan 26, 2023
1 parent 0a6e4ea commit 09251cf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ To immediately use a LLM model for your NLP task, we provide the `Prompter` API.
from promptify import OpenAI
from promptify import Prompter

sentence = 'The patient is a 93-year-old female with a medical
history of chronic right hip pain, osteoporosis,
hypertension, depression, and chronic atrial
fibrillation admitted for evaluation and management
of severe nausea and vomiting and urinary tract
infection'

model = OpenAI(api_key)
nlp_prompter = Prompter(model)
Expand All @@ -41,6 +47,20 @@ nlp_prompter = Prompter(model)
result = nlp_prompter.fit('ner.jinja',
domain = 'medical',
text_input = sentence)


### Output

[{'E': '93-year-old', 'T': 'Age'},
{'E': 'chronic right hip pain', 'T': 'Medical Condition'},
{'E': 'osteoporosis', 'T': 'Medical Condition'},
{'E': 'hypertension', 'T': 'Medical Condition'},
{'E': 'depression', 'T': 'Medical Condition'},
{'E': 'chronic atrial fibrillation', 'T': 'Medical Condition'},
{'E': 'severe nausea and vomiting', 'T': 'Symptom'},
{'E': 'urinary tract infection', 'T': 'Medical Condition'},
{'Branch': 'Internal Medicine', 'Group': 'Geriatrics'}]

```

<p float="left">
Expand Down

0 comments on commit 09251cf

Please sign in to comment.