animetix-web / frontend /src /features /admin /services /goldDatasetService.ts
MissawB's picture
Upload folder using huggingface_hub (part 4)
df2e14d verified
Raw
History Blame Contribute Delete
628 Bytes
import { apiClient } from '../../../utils/apiClient';
export const goldDatasetService = {
getList: async () => {
const data = await apiClient('/api/v1/mlops/gold-dataset/');
return data.results || data;
},
validateEntry: async (id: number) => {
return apiClient(`/api/v1/mlops/gold-dataset/${id}/validate/`, { method: 'POST' });
},
syncPositiveFeedback: async () => {
return apiClient('/api/v1/mlops/gold-dataset/sync_positive_feedback/', { method: 'POST' });
},
deleteEntry: async (id: number) => {
return apiClient(`/api/v1/mlops/gold-dataset/${id}/`, { method: 'DELETE' });
}
};