File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 4545warnings .filterwarnings ("ignore" , category = UserWarning , module = "huggingface_hub" )
4646
4747logger = Logger ().get_logger ()
48- __version__ = "0.8.26.dev0 "
48+ __version__ = "0.8.26"
4949
5050
5151def is_colab ():
Original file line number Diff line number Diff line change 44
55import requests
66
7+ from autotrain import logger
8+
79
810AUTOTRAIN_API = os .environ .get ("AUTOTRAIN_API" , "https://autotrain-projects-autotrain-advanced.hf.space/" )
911
@@ -258,7 +260,15 @@ def create(
258260 "valid_split" : valid_split ,
259261 }
260262 response = requests .post (url , headers = self .headers , json = data )
261- return response .json ()
263+ if response .status_code == 200 :
264+ resp = response .json ()
265+ logger .info (
266+ f"Project created successfully. Job ID: { resp ['job_id' ]} . View logs at: https://hf.co/spaces/{ resp ['job_id' ]} "
267+ )
268+ return resp
269+ else :
270+ logger .error (f"Error creating project: { response .json ()} " )
271+ return response .json ()
262272
263273 def get_logs (self , job_id : str ):
264274 url = f"{ self .host } /api/logs"
You can’t perform that action at this time.
0 commit comments