Spaces:
Sleeping
Sleeping
INTRODUCTION_MD = """ | |
<div style="display: flex; justify-content: center;"><h1> | |
🐢Giskard Evaluator - Text Classification | |
</h1></div> | |
Welcome to the Giskard Evaluator Space! Get a model vulnerability report immediately by simply sharing your model and dataset id below. | |
You can also checkout our library documentation <a href="https://docs.giskard.ai/en/latest/getting_started/quickstart/index.html">here</a>. | |
""" | |
CONFIRM_MAPPING_DETAILS_MD = """ | |
<div style="display: flex; justify-content: center;"><h1> | |
<h1 style="text-align: center;"> | |
Confirm Pre-processing Details | |
</h1> | |
</div> | |
Make sure the output variable's labels and the input variable's name are accurately mapped across both the dataset and the model. You can select the output variable's labels from the dropdowns below. | |
""" | |
CONFIRM_MAPPING_DETAILS_FAIL_MD = """ | |
<h1 style="text-align: center;"> | |
Confirm Pre-processing Details | |
</h1> | |
We're unable to automatically map the input variable's name and output variable's labels of your dataset with the model's. Please manually check the mapping below. | |
""" | |
CONFIRM_MAPPING_DETAILS_FAIL_RAW = """ | |
We're unable to automatically map the input variable's name and output variable's labels of your dataset with the model's. Please manually check the mapping below. | |
""" | |
CHECK_CONFIG_OR_SPLIT_RAW = """ | |
Please check your dataset config or split. | |
""" | |
CHECK_LOG_SECTION_RAW = """Your have successfully submitted a Giskard evaluation job. Further details are available in the Logs tab. You can find your report posted in your model's community discussion section.""" | |
PREDICTION_SAMPLE_MD = """ | |
<h1 style="text-align: center;"> | |
Model Prediction Sample | |
</h1> | |
Here's a sample of your model's prediction on an example from the dataset. | |
""" | |
MAPPING_STYLED_ERROR_WARNING = """ | |
<h3 style="text-align: center;color: orange; background-color: #fff0f3; border-radius: 8px; padding: 10px; "> | |
⚠️ We're unable to automatically map the input variable's name and output variable's labels of your dataset with the model's. Please manually check the mapping below. | |
</h3> | |
""" | |
UNMATCHED_MODEL_DATASET_STYLED_ERROR = """ | |
<h3 style="text-align: center;color: #fa5f5f; background-color: #fbe2e2; border-radius: 8px; padding: 10px; "> | |
❌ Your model and dataset have different numbers of labels. Please double check your model and dataset. | |
</h3> | |
""" | |
NOT_TEXT_CLASSIFICATION_MODEL_RAW = """ | |
Your model does not fall under the category of text classification. This page is specifically designated for the evaluation of text classification models. | |
""" | |
USE_INFERENCE_API_TIP = """ | |
To speed up the evaluation, we recommend using the | |
<a href="https://huggingface.co/docs/api-inference/detailed_parameters#text-classification-task"> | |
Hugging Face Inference API | |
</a> | |
. Please input your <a href="https://huggingface.co/docs/hub/security-tokens#user-access-tokens">Hugging Face token</a> to do so. You can find it <a href="https://huggingface.co/settings/tokens">here</a>. | |
""" | |
LOG_IN_TIPS = """ | |
To use the Hugging Face Inference API, you need to log in to your Hugging Face account. | |
""" | |
HF_TOKEN_INVALID_STYLED= """ | |
<p style="text-align: left;color: red; "> | |
Your Hugging Face token is invalid. Please double check your token. | |
</p> | |
""" | |
VALIDATED_MODEL_DATASET_STYLED = """ | |
<h3 style="text-align: center;color: #4ca154; background-color: #e2fbe8; border-radius: 8px; padding: 10px; "> | |
Your model and dataset have been validated! | |
</h3>""" | |
def get_dataset_fetch_error_raw(error): | |
return f"""Sorry you cannot use this dataset because {error}. Contact HF team to support this dataset.""" | |