Update convert.py
Browse files- convert.py +2 -2
convert.py
CHANGED
|
@@ -25,7 +25,7 @@ if torch.cuda.is_available():
|
|
| 25 |
else:
|
| 26 |
torch_dtype = torch.float32
|
| 27 |
|
| 28 |
-
|
| 29 |
def convert_single(model_id: str, filename: str, folder: str, progress: Any, token: str):
|
| 30 |
progress(0, desc="Downloading model")
|
| 31 |
local_file = os.path.join(model_id, filename)
|
|
@@ -51,7 +51,7 @@ def previous_pr(api: "HfApi", model_id: str, pr_title: str) -> Optional["Discuss
|
|
| 51 |
if details.target_branch == "refs/heads/main":
|
| 52 |
return discussion
|
| 53 |
|
| 54 |
-
|
| 55 |
def convert(token: str, model_id: str, filename: str, progress=gr.Progress()):
|
| 56 |
api = HfApi()
|
| 57 |
|
|
|
|
| 25 |
else:
|
| 26 |
torch_dtype = torch.float32
|
| 27 |
|
| 28 |
+
@spaces.GPU()
|
| 29 |
def convert_single(model_id: str, filename: str, folder: str, progress: Any, token: str):
|
| 30 |
progress(0, desc="Downloading model")
|
| 31 |
local_file = os.path.join(model_id, filename)
|
|
|
|
| 51 |
if details.target_branch == "refs/heads/main":
|
| 52 |
return discussion
|
| 53 |
|
| 54 |
+
@spaces.GPU()
|
| 55 |
def convert(token: str, model_id: str, filename: str, progress=gr.Progress()):
|
| 56 |
api = HfApi()
|
| 57 |
|