Update README.md
Browse files1234567891011121314151617181920212223242526272829303132333435---title: NeuroBERT-Tiny APIemoji: π€colorFrom: bluecolorTo: greensdk: dockerapp_port: 7860---# NeuroBERT-Tiny Masked Language Model APIThis Space hosts a FastAPI application that performs Masked Language Modeling using the [boltuix/NeuroBERT-Tiny](https://huggingface.co/boltuix/NeuroBERT-Tiny) model.## Endpoints:* **Health Check (GET /health):**Returns a simple message to confirm the API is running.Example: `curl https://brendon-ai-faq.hf.space/health`* **Predict (POST /predict):**Accepts a JSON payload with a `text` field containing a sentence with `[MASK]` tokens.Returns a list of top 5 predictions for each masked position.Example `curl` request:```bashcurl -X POST \-H "Content-Type: application/json" \-d '{"text": "The quick brown fox jumps over the [MASK] dog."}' \[https://brendon-ai-faq.hf.space/predict](https://brendon-ai-faq.hf.space/predict)```## Interactive API Documentation:You can find the full interactive API documentation at:* [Swagger UI](https://brendon-ai-faq.hf.space/docs)* [ReDoc](https://brendon-ai-faq.hf.space/redoc)12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394---title: Ollama APIemoji: π¦colorFrom: bluecolorTo: purplesdk: dockerpinned: falseapp_port: 7860---# Ollama Model APIA REST API for running Ollama models on Hugging Face Spaces.## Features- π¦ Run Ollama models via REST API- π Model management (pull, list, delete)- π¬ Chat completions- ποΈ Configurable parameters (temperature, top_p, etc.)- π Health monitoring## API Endpoints### Health Check- `GET /health` - Check if the service is running- `GET /models` - List available models### Model Management- `POST /models/pull` - Pull a model from Ollama registry- `DELETE /models/{model_name}` - Delete a model### Chat & Completions- `POST /chat` - Chat with a model- `POST /generate` - Generate text completion## Usage Examples### Pull a Model```bashcurl -X POST "https://your-space.hf.space/models/pull" \-H "Content-Type: application/json" \-d '{"model": "llama2:7b"}'```### Chat with Model```bashcurl -X POST "https://your-space.hf.space/chat" \-H "Content-Type: application/json" \-d '{"model": "llama2:7b","messages": [{"role": "user", "content": "Hello, how are you?"}]}'```### Generate Text```bashcurl -X POST "https://your-space.hf.space/generate" \-H "Content-Type: application/json" \-d '{"model": "llama2:7b","prompt": "The future of AI is","max_tokens": 100}'```## Supported ModelsThis setup supports any model available in the Ollama registry:- `llama2:7b`, `llama2:13b`- `mistral:7b`- `codellama:7b`- `vicuna:7b`- And many more...## Interactive DocumentationOnce deployed, visit `/docs` for interactive API documentation.## Notes- Model pulling may take several minutes depending on model size- Larger models require more memory and may not work on free tier- First inference may be slower as the model loads into memory## Resource Requirements- **Small models (7B)**: 8GB+ RAM recommended- **Medium models (13B)**: 16GB+ RAM recommended- **Large models (70B+)**: 32GB+ RAM requiredConsider using smaller models like `llama2:7b` or `mistral:7b` for better performance on limited resources.
README.md+82-23