File size: 488 Bytes
2b1084f 361bf71 1edc3ec 361bf71 1edc3ec 361bf71 4d29da8 1edc3ec |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from transformers import pipeline
# AI Pipeline Load Karo
nlp = pipeline("question-answering", model="dmis-lab/biobert-base-cased-v1.1")
# Function: Symptoms Ka Answer Generate Karega
def get_medical_advice(symptoms):
response = nlp({
'question': f"Best medicine for {symptoms}?",
'context': "Provide medicine recommendations based on disease."
})
return response['answer']
# Example Call
symptoms = "fever and headache"
print(get_medical_advice(symptoms)) |