phi3-prescription-reader

This model is a fine-tuned variant of phi-3-mini built using PyTorch and designed for reading and interpreting handwritten or scanned medical prescriptions. It has been adapted to perform well on noisy, handwritten-style inputs by combining OCR and prompt-based language understanding.

🧠 Use Case

The model is designed to:

  • Interpret scanned prescriptions
  • Extract key details like patient name, medications, dosage, and instructions
  • Provide structured output in JSON format for further use in healthcare applications

πŸ“¦ Model Details

  • Base Model: phi-3-mini
  • Framework: PyTorch
  • Training Data: Custom dataset of annotated prescription images and text (not publicly released)
  • Language: English
  • Task/Pipeline: Text Generation / Instruction Following
  • Tags: prescription, healthcare, phi3, OCR

πŸš€ How to Use

from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("Muizzzz8/phi3-prescription-reader", use_auth_token=True)
model = AutoModelForCausalLM.from_pretrained("Muizzzz8/phi3-prescription-reader", use_auth_token=True)

prompt = "Read the following prescription and extract medicine names and dosages:\n[IMAGE_TEXT_HERE]"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
11
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support