watsonx.ai

watsonx.ai

A one-stop, integrated, end- to-end AI development studio

 View Only
  • 1.  Image path from Jupyter Notebook?

    Posted Sun March 15, 2020 04:04 PM
    Edited by System Admin Wed November 01, 2023 04:52 PM
    Hello
    I uploaded a couple images to the Data Assets of my project.
    I also have a Jupyter notebook in the project, and I'd like to access the images from the notebook.
    What path should I specify?
    Thanks

    Also I tried to access images thru the project with this code (from one of the samples):
    from project_lib import Project
    project = Project(project_id='Classimage project', project_access_token='<myProjectsToken')
    and got this error:
    2020-03-15 09:14:12,904 - __PROJECT_LIB__ - ERROR - GET project failed, status 400 from https://api.dataplatform.cloud.ibm.com/v2/projects/Classimage
    {"code":400,"error":"Bad Request","reason":"Unrecognized Bearer auth token format encountered. Expected: JSON Web Token (JWT) or Tenant Access Token format. Received: ServiceId-cbd4ec40-3bb1-478d-8859-2f3aede0f1d8.","message":"Bearer token is invalid."}
    can you help me resolve the error?
    Thanks!

    ------------------------------
    Michael I Hay
    ------------------------------
    #WatsonStudio


  • 2.  RE: Image path from Jupyter Notebook?

    Posted Mon March 16, 2020 05:12 AM
    Hi Michael,

    You need the alphanumeric project_id. Found in the project URL as mentioned in your other thread.

    Chris

    ------------------------------
    Chris Watson
    ------------------------------



  • 3.  RE: Image path from Jupyter Notebook?

    Posted Mon March 16, 2020 06:21 AM
    Here is what works for me: Click on the three vertical dots in the menu and select "insert project token". The correct code lines will be inserted.

    ------------------------------
    Marc Fiammante
    DE
    IBM
    Nice
    ------------------------------