faq / README.md
brendon-ai's picture
Update README.md
c4bd657 verified
|
raw
history blame
1.14 kB
---
title: NeuroBERT-Tiny API
emoji: 🤖
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
---
# NeuroBERT-Tiny Masked Language Model API
This 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:
```bash
curl -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)