--- license: apache-2.0 language: - en pipeline_tag: text-generation base_model: Qwen/Qwen2.5-1.5B tags: - qwen2 - text-generation - ayurveda - chatbot - instruct --- # Ayurveda Chat Ayurveda Chat is a fine-tuned text-generation model designed to answer questions about Ayurveda in a simple, conversational way. ## Model Overview - **Model ID:** `arti456789/ayurveda-chat` - **Base model:** `Qwen/Qwen2.5-1.5B` - **Task:** Text generation / chat - **License:** Apache 2.0 - **Language:** English ## Try the Demo You can test the model in the browser through the Space: [Open Ayurveda Chat Space](https://huggingface.co/spaces/arti456789/ayurveda-chat-space) ## Try in Google Colab [!Open In Colab](https://colab.research.google.com/drive/1E4UaV_CE6VyXB5s4CDNves3K5JOXmFC1?usp=sharing) ## How to Use ### With Transformers ```python import torch from transformers import AutoTokenizer, AutoModelForCausalLM repo_id = "arti456789/ayurveda-chat" tokenizer = AutoTokenizer.from_pretrained(repo_id, use_fast=True) model = AutoModelForCausalLM.from_pretrained( repo_id, torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32, device_map="auto" if torch.cuda.is_available() else None, ) model.eval() def ask_model(question, max_new_tokens=128): prompt = f"""System: You are a helpful assistant. Answer the user's question clearly and safely. User: {question} Assistant:""" inputs = tokenizer(prompt, return_tensors="pt") if torch.cuda.is_available(): inputs = {k: v.to(model.device) for k, v in inputs.items()} with torch.no_grad(): outputs = model.generate( **inputs, max_new_tokens=max_new_tokens, do_sample=True, temperature=0.7, top_p=0.9, repetition_penalty=1.1, pad_token_id=tokenizer.eos_token_id, ) text = tokenizer.decode(outputs[0], skip_special_tokens=True) return text.split("Assistant:")[-1].strip() print(ask_model("What is Vata dosha?")) ``` ## Example Prompts - What is Ayurveda? - What is Vata dosha? - What are the three doshas? - What is Prakriti in Ayurveda? - How does Ayurveda explain digestion? - What is Agni in Ayurveda? ## Intended Use This model is intended for: - general Ayurveda Q&A - simple explanatory responses - educational chatbot demos ## Limitations - This model is not a medical professional. - It should not be used for diagnosis or emergency care. - It may give incorrect or oversimplified answers. - Always verify important health information with a qualified clinician. ## Safety Note If you have urgent symptoms such as chest pain, breathing difficulty, sudden weakness, severe bleeding, or confusion, seek emergency medical care immediately. ## Training Notes This repository contains the exported model files and tokenizer files for the fine-tuned Ayurveda chatbot. ## Files Included - `config.json` - `model.safetensors` - `tokenizer.json` - `tokenizer_config.json` - `special_tokens_map.json` - `added_tokens.json` - `vocab.json` - `merges.txt` ## Citation If you use this model, please cite the repository and the underlying base model.