Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekkrthakur committed Nov 7, 2024
1 parent 74fb15e commit e55140b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/autotrain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
warnings.filterwarnings("ignore", category=UserWarning, module="huggingface_hub")

logger = Logger().get_logger()
__version__ = "0.8.26.dev0"
__version__ = "0.8.26"


def is_colab():
Expand Down
12 changes: 11 additions & 1 deletion src/autotrain/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import requests

from autotrain import logger


AUTOTRAIN_API = os.environ.get("AUTOTRAIN_API", "https://autotrain-projects-autotrain-advanced.hf.space/")

Expand Down Expand Up @@ -258,7 +260,15 @@ def create(
"valid_split": valid_split,
}
response = requests.post(url, headers=self.headers, json=data)
return response.json()
if response.status_code == 200:
resp = response.json()
logger.info(
f"Project created successfully. Job ID: {resp['job_id']}. View logs at: https://hf.co/spaces/{resp['job_id']}"
)
return resp
else:
logger.error(f"Error creating project: {response.json()}")
return response.json()

def get_logs(self, job_id: str):
url = f"{self.host}/api/logs"
Expand Down

0 comments on commit e55140b

Please sign in to comment.