You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Sorry for the confusion. I have corrected the main readme.md example. 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("your_key")
nlp_prompter = Prompter(model)
result = nlp_prompter.fit('ner.jinja', domain ='medical', text_input = sentence, labels = None)
eval(result['text'])
With python3.10, the code fails with
ImportError: cannot import name 'soft_unicode' from 'markupsafe'
.aws/aws-sam-cli#3661 (comment) helps fixing that.
Still with that change, with the introductory example we get
It would be great if the main setup instructions work out of the box.
The text was updated successfully, but these errors were encountered: