Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
4f05bbf1
Unverified
Commit
4f05bbf1
authored
May 10, 2023
by
Lysandre Debut
Committed by
GitHub
May 10, 2023
Browse files
Metadata update (#23259)
* Metadata update * Make fixup
parent
996f127a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/tools/base.py
src/transformers/tools/base.py
+2
-1
No files found.
src/transformers/tools/base.py
View file @
4f05bbf1
...
@@ -23,7 +23,7 @@ import os
...
@@ -23,7 +23,7 @@ import os
import
tempfile
import
tempfile
from
typing
import
Any
,
Dict
,
List
,
Optional
,
Union
from
typing
import
Any
,
Dict
,
List
,
Optional
,
Union
from
huggingface_hub
import
CommitOperationAdd
,
HfFolder
,
create_commit
,
create_repo
,
hf_hub_download
from
huggingface_hub
import
CommitOperationAdd
,
HfFolder
,
create_commit
,
create_repo
,
hf_hub_download
,
metadata_update
from
huggingface_hub.utils
import
RepositoryNotFoundError
,
get_session
from
huggingface_hub.utils
import
RepositoryNotFoundError
,
get_session
from
..dynamic_module_utils
import
custom_object_save
,
get_class_from_dynamic_module
,
get_imports
from
..dynamic_module_utils
import
custom_object_save
,
get_class_from_dynamic_module
,
get_imports
...
@@ -285,6 +285,7 @@ class Tool:
...
@@ -285,6 +285,7 @@ class Tool:
repo_url
=
create_repo
(
repo_url
=
create_repo
(
repo_id
=
repo_id
,
token
=
token
,
private
=
private
,
exist_ok
=
True
,
repo_type
=
"space"
,
space_sdk
=
"gradio"
repo_id
=
repo_id
,
token
=
token
,
private
=
private
,
exist_ok
=
True
,
repo_type
=
"space"
,
space_sdk
=
"gradio"
)
)
metadata_update
(
repo_id
,
{
"tags"
:
[
"tool"
]},
repo_type
=
"space"
)
repo_id
=
repo_url
.
repo_id
repo_id
=
repo_url
.
repo_id
with
tempfile
.
TemporaryDirectory
()
as
work_dir
:
with
tempfile
.
TemporaryDirectory
()
as
work_dir
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment