Downloads · 30 days
13
8% of all-time downloads
riad-hf/riad-disease-gpt
riad-disease-gpt is a text generation model from riad-hf. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A lightweight medical question-answering model trained on disease-related queries.
Downloads · 30 days
13
8% of all-time downloads
All-time downloads
168
Public
Repo size
224 MB
Likes
1
Public
Click a slice to open those files.
.bin44.1 MB · 50%
From the Hugging Face model README
A lightweight medical question-answering model trained on disease-related queries.
from transformers import AutoModel, AutoTokenizer
import sentencepiece as spm
# Load model
model = AutoModel.from_pretrained("riadrayhan111/riad-disease-gpt", trust_remote_code=True)
tokenizer = spm.SentencePieceProcessor()
tokenizer.load('riadrayhan111/riad-disease-gpt/tokenizer.model')
# Generate response
class SimpleTokenizer:
def __init__(self, sp_model):
self.sp = sp_model
self.eos_token_id = 2
def encode(self, text):
return self.sp.encode(text)
def decode(self, tokens):
return self.sp.decode(tokens)
tok = SimpleTokenizer(tokenizer)
answer = model.generate_text(tok, "What is fever?", max_length=100)
print(answer)
Trained on a custom medical dataset focused on common diseases, symptoms, and treatments.
⚠️ Important: This model is for educational purposes only.
Apache 2.0