Skip to content

Commit 4477641

Browse files
committed
fix
1 parent 5b46369 commit 4477641

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

roboflow/core/workspace.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,12 +600,12 @@ def deploy_model(
600600
if zip_file_name is None:
601601
raise RuntimeError("Failed to process model")
602602

603-
self._upload_zip(model_type, model_path, zip_file_name, project_urls)
603+
self._upload_zip(model_type, model_path, project_urls, zip_file_name)
604604

605605
def _upload_zip(self, model_type: str, model_path: str, project_urls: list[str], model_file_name: str):
606606
# TODO: Need to create this endpoint
607607
res = requests.post(
608-
f"{API_URL}/{self.workspace}/uploadModel?api_key={self.__api_key}&modelType={model_type}&project_urls={','.join(project_urls)}&nocache=true"
608+
f"{API_URL}/{self.url}/uploadModel?api_key={self.__api_key}&modelType={model_type}&project_urls={','.join(project_urls)}&nocache=true"
609609
)
610610
try:
611611
res.raise_for_status()
@@ -622,7 +622,7 @@ def _upload_zip(self, model_type: str, model_path: str, project_urls: list[str],
622622
res.raise_for_status()
623623

624624
# TODO: Need to check this URL
625-
print("View the status of your deployment at:" f" {APP_URL}/{self.workspace}/models")
625+
print("View the status of your deployment at:" f" {APP_URL}/{self.url}/models")
626626

627627
except Exception as e:
628628
print(f"An error occured when uploading the model: {e}")

roboflow/util/model_processor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import shutil
44
import zipfile
5+
from typing import Callable
56

67
import yaml
78

@@ -13,7 +14,7 @@ def process(model_type: str, model_path: str, filename: str) -> str:
1314
return processor(model_type, model_path, filename)
1415

1516

16-
def _get_processor_function(model_type: str) -> callable:
17+
def _get_processor_function(model_type: str) -> Callable:
1718
if model_type.startswith("yolo11"):
1819
model_type = model_type.replace("yolo11", "yolov11")
1920

0 commit comments

Comments
 (0)