Davy592's picture
Adapted to HSpaces structure
bda9999
|
raw
history blame
1.2 kB
metadata
title: Nygaard Code Comment Classification
emoji: 🚀
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
license: apache-2.0

Nygaard Code Comment Classification

Multi-label classification API for code comments across Java, Python, and Pharo.

Features

  • Multi-language Support: Java, Python, Pharo
  • ML Models: CatBoost-based classifiers
  • REST API: FastAPI with async endpoints
  • Docker Ready: Deployable to Hugging Face Spaces

API Endpoints

GET /models

Retrieve available models grouped by language.

GET /languages

Get supported programming languages.

POST /predict

Classify code comments.

Request:

{
  "texts": ["code comment"],
  "language": "java",
  "model_type": "catboost"
}

Response:

{
  "status-code": 200,
  "message": "Prediction successful",
  "data": {
    "model_used": "catboost",
    "language": "java",
    "results": [{"text": "code comment", "labels": [...]}]
  }
}

Deployment on Hugging Face Spaces

This space is configured to run with Docker. Push to your HF repository:

git push

For more info: https://huggingface.co/docs/hub/spaces-config-reference