Text Generation
Transformers
Safetensors
English
gpt2
healthcare
womens-health
conversational
text-generation-inference
Instructions to use JCholder/womens-health-chatbot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JCholder/womens-health-chatbot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JCholder/womens-health-chatbot") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JCholder/womens-health-chatbot") model = AutoModelForCausalLM.from_pretrained("JCholder/womens-health-chatbot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JCholder/womens-health-chatbot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JCholder/womens-health-chatbot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JCholder/womens-health-chatbot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JCholder/womens-health-chatbot
- SGLang
How to use JCholder/womens-health-chatbot with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "JCholder/womens-health-chatbot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JCholder/womens-health-chatbot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "JCholder/womens-health-chatbot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JCholder/womens-health-chatbot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use JCholder/womens-health-chatbot with Docker Model Runner:
docker model run hf.co/JCholder/womens-health-chatbot
Women's Health Chatbot ๐ฅ
This GPT-2 model has been fine-tuned to provide helpful, empathetic responses to questions about women's health and reproductive wellness.
Model Description
- Base Model: GPT-2 Medium
- Training Data: 8,278 conversation pairs from women's health Q&A
- Fine-tuning: Specialized for women's health topics
- Features: Context-aware responses, emergency detection, medical disclaimers
Topics Covered
- Menstrual health and cycle issues
- Sexual and reproductive health
- Pregnancy and fertility questions
- Gynecological conditions (PCOS, endometriosis, etc.)
- General women's wellness
- Emergency situation detection
Performance Metrics
- BLEU Score: 0.0057
- Perplexity: 135.97
- Domain Relevance: 0.71
- Training Loss: 0.7526
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the model
model = AutoModelForCausalLM.from_pretrained("JCholder/womens-health-chatbot")
tokenizer = AutoTokenizer.from_pretrained("JCholder/womens-health-chatbot")
def ask_health_question(question):
prompt = f"USER: {question}\nDOCTOR:"
inputs = tokenizer(prompt, return_tensors="pt", max_length=400, truncation=True)
outputs = model.generate(
**inputs,
max_new_tokens=120,
temperature=0.7,
top_p=0.9,
repetition_penalty=1.3,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
full_response = tokenizer.decode(outputs[0], skip_special_tokens=True)
response = full_response.split("DOCTOR:")[-1].strip()
return response
# Example usage
question = "What causes irregular periods?"
response = ask_health_question(question)
print(response)
NextJS Integration
// NextJS API Route (pages/api/chat.js)
import { pipeline } from '@huggingface/transformers';
let chatbot;
async function initializeChatbot() {
if (!chatbot) {
chatbot = await pipeline('text-generation', 'JCholder/womens-health-chatbot');
}
return chatbot;
}
export default async function handler(req, res) {
const { message } = req.body;
const model = await initializeChatbot();
const prompt = `USER: ${message}\nDOCTOR:`;
const result = await model(prompt, {
max_new_tokens: 100,
temperature: 0.7,
return_full_text: false
});
const response = result[0].generated_text.trim();
res.json({ response });
}
Safety Features
- ๐จ Emergency keyword detection (suicide, severe bleeding, etc.)
- ๐ฏ Domain boundary enforcement (women's health only)
- ๐ Medical disclaimer integration
- ๐ก๏ธ Appropriate response filtering
Limitations
- This model is for educational and informational purposes only
- Not a substitute for professional medical advice
- Should not be used for emergency medical situations
- Always consult healthcare providers for serious concerns
Model Details
- Training Steps: 6207
- Parameters: ~354,823,168 parameters
- Framework: PyTorch, Transformers
- Fine-tuning Method: Causal Language Modeling
Ethical Considerations
This model has been designed with healthcare ethics in mind:
- Encourages professional medical consultation
- Avoids giving specific medical diagnoses
- Includes appropriate disclaimers
- Respects user privacy and autonomy
Citation
@misc{womens-health-chatbot,
title={Women's Health Chatbot},
author={Juliana Holder},
year={2025},
url={https://huggingface.co/JCholder/womens-health-chatbot}
}
Dataset
Trained on the altaidevorg/women-health-mini dataset containing professional women's health Q&A pairs.
Contact
For questions about this model, please refer to the project documentation or contact the model author.
- Downloads last month
- 7