Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PreTrained Model - Response not giving properly #16

Open
sudheersan opened this issue Mar 18, 2024 · 0 comments
Open

PreTrained Model - Response not giving properly #16

sudheersan opened this issue Mar 18, 2024 · 0 comments

Comments

@sudheersan
Copy link

sudheersan commented Mar 18, 2024

Inference API response on Hugging Face : Link

Code, I've written for testing:

self.pipeline = pipeline(
            "token-classification",
            model=AutoModelForTokenClassification.from_pretrained(self.model_path),
            tokenizer=AutoTokenizer.from_pretrained(self.model_path),
            # Will attempt to group sub-entities to word level
            aggregation_strategy=self.aggregation_mechanism,
            device=device,
            framework="pt",
            ignore_labels=self.ignore_labels,
        )
        
self.pipeline(text)

Text Used for testing

PROCEDURE: Mr. John Doe age 29 years underwent a cardiac procedure at Mercy Hospital on January 1, 2020. The surgery was performed by Dr. Smith.

FINDINGS: The procedure revealed a blockage in the left anterior descending artery.

IMPRESSION: Mr. Doe's medical records, including his SSN (123-45-6789), MRN (987654321), and insurance information (Blue Cross Blue Shield), were securely stored in the hospital's database under ID 5874233. For further inquiries, please contact Mercy Hospital at 567-493-1234 or visit their website www.mercyhospital.com. Mr. Doe can also be reached via email at johndoe@example.com. Attached is a retinal scan for biometric identification purposes. Medical equipment used during the procedure was supplied by Medical Supply Inc.

Predictions are not coming properly, and response is same as showing in Inference link shared above.

Interestingly, code space is working fine : Link

How to fix this issue? thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant