metadata
title: Mini-Omni2 Flask API
emoji: 🤖
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
Mini-Omni2 Flask API
A Flask API serving the Noblhyon/mini-omni2 model from Hugging Face.
Features
- RESTful API endpoints for text generation
- Chat interface endpoint
- Health checks and model information
- Docker support for easy deployment
- Hugging Face Spaces compatible
API Endpoints
Health Check
GET /
Returns the health status of the API and model loading status.
Chat Endpoint
POST /chat
Chat with the model using a simple message format.
Request Body:
{
"message": "Your message here",
"max_length": 512,
"temperature": 0.7
}
Generate Endpoint
POST /generate
Generate text with advanced parameters.
Request Body:
{
"prompt": "Your prompt here",
"max_length": 512,
"temperature": 0.7,
"top_p": 0.9,
"top_k": 50
}
Model Info
GET /model-info
Get information about the loaded model.
Usage Examples
Chat Example
curl -X POST https://noblhyon-arrow.hf.space/chat \
-H "Content-Type: application/json" \
-d '{"message": "Hello, how are you today?"}'
Generate Example
curl -X POST https://noblhyon-arrow.hf.space/generate \
-H "Content-Type: application/json" \
-d '{
"prompt": "The future of artificial intelligence is",
"max_length": 200,
"temperature": 0.8,
"top_p": 0.9
}'
Model Information
- Model: Noblhyon/mini-omni2
- Platform: Hugging Face Transformers
- Framework: PyTorch
- API Framework: Flask
License
MIT