Spaces:
Sleeping
Sleeping
import huggingface_hub as hf_hub | |
def create_discussion(repo_id, model_name, hf_token, report): | |
# Create a discussion | |
discussion = hf_hub.create_discussion(repo_id, title=f"Report for {model_name}", token=hf_token, description=report, repo_type="space") | |
return discussion | |
def create_discussion_detailed(repo_id, model_name, dataset_id, dataset_config, dataset_split, hf_token, report): | |
# Create a discussion | |
discussion = hf_hub.create_discussion( | |
repo_id, | |
title=f"Report for {model_name} on {dataset_id} ({dataset_config}, {dataset_split} set)", | |
token=hf_token, | |
description=report, | |
repo_type="space" | |
) | |
return discussion | |