Closed abnerjacobsen closed 1 year ago
Hi, You need to pass labels = None
and eval(result['text'])
. Here is a working example
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("sk-MYKEY")
nlp_prompter = Prompter(model)
result = nlp_prompter.fit('ner.jinja', domain ='medical', text_input = sentence, labels = None)
eval(result['text'])
Hi,
I'm trying to run the example in the README, but I'm getting an error.
The source code I used was this:
And the error that occurs is this:
Any idea what I'm doing wrong?
Thanks.