Skip to content

Commit

Permalink
Remove paying subscription mention from docstring (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
cakiki authored Feb 22, 2022
1 parent a2d2c54 commit 10bc09f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
<script>
import { tick } from "svelte";
import WidgetLabel from "../WidgetLabel/WidgetLabel.svelte";
export let label: string = "";
export let placeholder: string = "Your sentence here...";
export let value: string;
let textAreaEl: HTMLTextAreaElement;
const HEIGHT_LIMIT = 500 as const;
async function resize() {
if (!!textAreaEl) {
textAreaEl.style.height = "0px";
await tick();
textAreaEl.style.height =
Math.min(textAreaEl.scrollHeight, HEIGHT_LIMIT) + "px";
}
}
// hack to handle FireFox contenteditable bug
let innterHTML: string;
let spanEl: HTMLSpanElement;
const REGEX_SPAN = /<span .+>(.*)<\/span>/gms;
$: {
value;
resize();
if (spanEl && innterHTML && REGEX_SPAN.test(innterHTML)) {
innterHTML = innterHTML.replace(REGEX_SPAN, (_, txt) => {
return txt;
});
spanEl.blur();
}
}
</script>

<WidgetLabel {label}>
<svelte:fragment slot="after">
<textarea
bind:this={textAreaEl}
bind:value
<span
bind:textContent={value}
bind:innerHTML={innterHTML}
bind:this={spanEl}
class="{label
? 'mt-1.5'
: ''} block w-full border border-gray-200 rounded-lg shadow-inner outline-none focus:ring-1 focus:ring-inset focus:ring-indigo-200 focus:shadow-inner dark:bg-gray-925"
{placeholder}
: ''} block overflow-auto resize-y py-2 px-3 w-full min-h-[42px] max-h-[500px] border border-gray-200 rounded-lg shadow-inner outline-none focus:ring-1 focus:ring-inset focus:ring-indigo-200 focus:shadow-inner dark:bg-gray-925"
role="textbox"
contenteditable
style="--placeholder: '{placeholder}'"
/>
</svelte:fragment>
</WidgetLabel>

<style>
span[contenteditable]:empty::before {
content: var(--placeholder);
color: rgba(156, 163, 175);
}
</style>
2 changes: 1 addition & 1 deletion src/huggingface_hub/hub_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def push_to_hub(
Organization in which you want to push your model or tokenizer (you must be a member of this
organization).
private (:obj:`bool`, `optional`):
Whether or not the repository created should be private (requires a paying subscription).
Whether or not the repository created should be private.
api_endpoint (:obj:`str`, `optional`):
The API endpoint to use when pushing the model to the hub.
use_auth_token (:obj:`bool` or :obj:`str`, `optional`):
Expand Down
2 changes: 1 addition & 1 deletion src/huggingface_hub/keras_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def push_to_hub_keras(
Organization in which you want to push your model or tokenizer (you must be a member of this
organization).
private (:obj:`bool`, `optional`):
Whether or not the repository created should be private (requires a paying subscription).
Whether or not the repository created should be private.
api_endpoint (:obj:`str`, `optional`):
The API endpoint to use when pushing the model to the hub.
use_auth_token (:obj:`bool` or :obj:`str`, `optional`):
Expand Down

0 comments on commit 10bc09f

Please sign in to comment.