Instructions to use Lukamac/PlayPart-AI-Personal-Trainer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lukamac/PlayPart-AI-Personal-Trainer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Lukamac/PlayPart-AI-Personal-Trainer")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Lukamac/PlayPart-AI-Personal-Trainer") model = AutoModelForCausalLM.from_pretrained("Lukamac/PlayPart-AI-Personal-Trainer") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Lukamac/PlayPart-AI-Personal-Trainer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lukamac/PlayPart-AI-Personal-Trainer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lukamac/PlayPart-AI-Personal-Trainer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Lukamac/PlayPart-AI-Personal-Trainer
- SGLang
How to use Lukamac/PlayPart-AI-Personal-Trainer 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 "Lukamac/PlayPart-AI-Personal-Trainer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lukamac/PlayPart-AI-Personal-Trainer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Lukamac/PlayPart-AI-Personal-Trainer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lukamac/PlayPart-AI-Personal-Trainer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Lukamac/PlayPart-AI-Personal-Trainer with Docker Model Runner:
docker model run hf.co/Lukamac/PlayPart-AI-Personal-Trainer
metadata
license: apache-2.0
datasets:
- lizziepika/strava_activities_runs
- Lukamac/MegaGym_dataset
language:
- en
metrics:
- perplexity
- accuracy
base_model:
- openai-community/gpt2
pipeline_tag: text-generation
library_name: transformers
tags:
- gpt2
- text-generation
- sports
- fitness
- gym
PlayPart AI Personal Trainer Model
This model is a fine-tuned version of GPT-2, specifically trained on sports-related and gym exercise datasets. It is intended to provide text-generation capabilities for answering questions about fitness, sports, workout routines, and providing personalized training suggestions.
Intended Use
- Text Generation: Generate text based on sports and fitness questions and interactions.
- Personal Trainer Chatbot: Suitable for chatbot integrations focused on fitness, workouts, and sports topics.
Usage
To use the model, you can either use the Hugging Face Inference API or load it in your Python environment.
Example (Python)
from transformers import GPT2Tokenizer, GPT2LMHeadModel
# Load the model
tokenizer = GPT2Tokenizer.from_pretrained("Lukamac/PlayPart-AI-Personal-Trainer")
model = GPT2LMHeadModel.from_pretrained("Lukamac/PlayPart-AI-Personal-Trainer")
# Generate a response
input_text = "What are the best exercises for building upper body strength?"
input_ids = tokenizer.encode(input_text, return_tensors='pt')
output_ids = model.generate(input_ids, max_length=50)
response = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(response)