CoolFace
Apppublic

vladdoingml/multi_task_bert_model-2_1

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

Multi-Task BERT API

This Space provides a REST API for the victoria-lozhkina/multi_task_bert_model-2_1 model with support for:

  • Sentiment Analysis
  • Named Entity Recognition (NER)
  • Text Classification

API Usage

General Inference Endpoint

bash
curl -X POST https://your-space-url.hf.space/ \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": "I love this product!",
    "task_type": "sentiment"
  }'

Sentiment Analysis

bash
curl -X POST https://your-space-url.hf.space/sentiment \
  -H "Content-Type: application/json" \
  -d '{"inputs": "This is amazing!"}'

Named Entity Recognition

bash
curl -X POST https://your-space-url.hf.space/ner \
  -H "Content-Type: application/json" \
  -d '{"inputs": "Apple Inc. was founded by Steve Jobs in Cupertino."}'

Text Classification

bash
curl -X POST https://your-space-url.hf.space/classification \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": "Machine learning is transforming industries.",
    "parameters": {
      "candidate_labels": ["technology", "business", "science", "education"]
    }
  }'

Health Check

bash
curl https://your-space-url.hf.space/health