Spaces:
Sleeping
Sleeping
inoki-giskard
commited on
Commit
·
c50532c
1
Parent(s):
d1e5b15
Polish wordings to emphasize free HF inference API
Browse files- app_text_classification.py +2 -0
- wordings.py +13 -2
app_text_classification.py
CHANGED
@@ -22,6 +22,7 @@ from wordings import (
|
|
22 |
CONFIRM_MAPPING_DETAILS_MD,
|
23 |
INTRODUCTION_MD,
|
24 |
USE_INFERENCE_API_TIP,
|
|
|
25 |
CHECK_LOG_SECTION_RAW,
|
26 |
HF_TOKEN_INVALID_STYLED,
|
27 |
)
|
@@ -113,6 +114,7 @@ def get_demo():
|
|
113 |
interactive=True,
|
114 |
)
|
115 |
inference_token_info = gr.HTML(value=HF_TOKEN_INVALID_STYLED, visible=False)
|
|
|
116 |
|
117 |
inference_token.change(
|
118 |
fn=show_hf_token_info,
|
|
|
22 |
CONFIRM_MAPPING_DETAILS_MD,
|
23 |
INTRODUCTION_MD,
|
24 |
USE_INFERENCE_API_TIP,
|
25 |
+
USE_INFERENCE_API_NOTICE,
|
26 |
CHECK_LOG_SECTION_RAW,
|
27 |
HF_TOKEN_INVALID_STYLED,
|
28 |
)
|
|
|
114 |
interactive=True,
|
115 |
)
|
116 |
inference_token_info = gr.HTML(value=HF_TOKEN_INVALID_STYLED, visible=False)
|
117 |
+
gr.HTML(USE_INFERENCE_API_NOTICE)
|
118 |
|
119 |
inference_token.change(
|
120 |
fn=show_hf_token_info,
|
wordings.py
CHANGED
@@ -60,13 +60,24 @@ NOT_TEXT_CLASSIFICATION_MODEL_RAW = """
|
|
60 |
"""
|
61 |
|
62 |
USE_INFERENCE_API_TIP = """
|
63 |
-
|
64 |
<a href="https://huggingface.co/docs/api-inference/detailed_parameters#text-classification-task">
|
65 |
Hugging Face Inference API
|
66 |
</a>
|
67 |
-
|
|
|
|
|
|
|
68 |
"""
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
HF_TOKEN_INVALID_STYLED = """
|
71 |
<p style="text-align: left;color: red; ">
|
72 |
Your Hugging Face token is invalid. Please double check your token.
|
|
|
60 |
"""
|
61 |
|
62 |
USE_INFERENCE_API_TIP = """
|
63 |
+
We use the <b>free</b>
|
64 |
<a href="https://huggingface.co/docs/api-inference/detailed_parameters#text-classification-task">
|
65 |
Hugging Face Inference API
|
66 |
</a>
|
67 |
+
to evaluate the models with a <a href="https://huggingface.co/docs/hub/security-tokens#user-access-tokens">Hugging Face acces token</a>.
|
68 |
+
<br/>
|
69 |
+
Please <a href="https://huggingface.co/settings/tokens">get your token</a> and input here. This would help us to avoid the API calling rate limit and make the evaluation faster.
|
70 |
+
<br/>
|
71 |
"""
|
72 |
|
73 |
+
USE_INFERENCE_API_NOTICE = """
|
74 |
+
<b>Notice:</b>
|
75 |
+
<ul>
|
76 |
+
<li><b>Your token will only be used for your own evaluation, and will not be saved.</b></li>
|
77 |
+
<li><b>You will not be charged for the free Hugging Face Inference API.</b></li>
|
78 |
+
</ul>
|
79 |
+
"""
|
80 |
+
|
81 |
HF_TOKEN_INVALID_STYLED = """
|
82 |
<p style="text-align: left;color: red; ">
|
83 |
Your Hugging Face token is invalid. Please double check your token.
|