|
from fastapi import APIRouter |
|
from .utils.evaluation import AudioEvaluationRequest |
|
from .utils.emissions import get_space_info |
|
|
|
router = APIRouter() |
|
|
|
DESCRIPTION = "Random Baseline" |
|
|
|
@router.post("/audio", tags=["Audio Task"], |
|
description=DESCRIPTION) |
|
async def evaluate_audio(request: AudioEvaluationRequest): |
|
""" |
|
Evaluate audio classification. |
|
|
|
Current Model: Random Baseline |
|
- Makes random predictions |
|
- Used as a baseline for comparison |
|
""" |
|
username, space_url = get_space_info() |
|
return { |
|
"message": "Audio evaluation endpoint not yet implemented", |
|
"username": username, |
|
"space_url": space_url, |
|
"model_description": DESCRIPTION, |
|
"received_config": { |
|
"dataset_name": request.dataset_name, |
|
"test_size": request.test_size, |
|
"test_seed": request.test_seed |
|
} |
|
} |