How to Create a Customer Profile with IBM Watson - Part 2 - Watson Personality Insights

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • Setup is done and dusted. It’s time to generate some profiles!
    In this video I’ll run through how to generate a customer (or any other human) profile from a block of text using IBM Watson Personality Insights. This whole tutorial will take you from blank slate to getting results that showcase the API’s awesome features. You’ll be able to analyse customer needs, values and their personality….all from a block of text.
    Want to follow along with the blog post? Check it out here: www.nicholasre...
    Want more awesome data and analytics stuff?? Follow me on…
    Blog: www.nicholasrenotte.com
    Twitter: / nicholasrenotte
    Facebook: / nickrenotte

Комментарии • 36

  • @NicholasRenotte
    @NicholasRenotte  5 лет назад +2

    Hey everyone, there's two key changes that have come out that require some code tweaks. Nothing major.
    First, when importing the Personality Insights Service replace watson_developer_cloud with ibm_watson like so:
    Before:
    from watson_developer_cloud import PersonalityInsightsV3
    After:
    from ibm_watson import PersonalityInsightsV3
    Second, the new package requires you to set a new parameter which specifies the response type as JSON. So, these are the changes required when requesting a profile.
    Before:
    profile = service.profile(f.read(), content_type='text/plain',).get_result()
    After:
    profile = service.profile(f.read(), accept='application/json').get_result()
    The blog post has been updated to reflect those changes: www.nicholasrenotte.com/how-to-develop-customer-profiles-using-ibm-watson-personality-insights/
    Happy coding!!

  • @pAirA_
    @pAirA_ 4 года назад +1

    Hi Nicholas!
    I have been trying this for myself, and also took the deprecations to account. However, I am facing an error that I can't figure out why.
    ApiException: Error: Provided API key could not be found, Code: 400
    I have generated my own API key through IBM's IAM authentication page. My first API key showed a forbidden error code 403. Then I created another API key and tried that, which then showed the error code 400 again.
    Now when I try either key, I get the error code 400.
    Amazing video anyways! Hope you do well.
    UPDATE: I have watched Part1 of this series and it turns out I never created a Service Credential. This solved my problem. It works wonderfully now. You are amazing! Thanks a LOT!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      AWESOME @Faiyaz Murshed, glad you got it working!

  • @taym2025
    @taym2025 3 года назад +2

    Question. IBM Watson Personality Insights has been 'discontinued', have you come across any alternatives?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Not as of yet unfortunately @Tay M, will let you know once I find one!

    • @3mpty88
      @3mpty88 3 года назад

      @@NicholasRenotte Please, let me know too. I'm very interested in this topic and your tutorials are great.

  • @webhosters
    @webhosters 5 лет назад +1

    Hi! i got an error on connecting to watson_developer_cloud on the code.. it says it doesn't recognise that command. Are you sure is the way to connect?

    • @NicholasRenotte
      @NicholasRenotte  5 лет назад

      The watson_developer_cloud module is being deprecated. Try this:
      1. First install the new watson library:
      pip install ibm-watson
      2. Then in your notebook, import the new library and continue with the rest of the code:
      from ibm_watson import
      .... continue with regular code
      PersonalityServiceV3
      service = PersonalityInsightsV3(url=url, version='2017-10-13', iam_apikey=apikey)

    • @webhosters
      @webhosters 5 лет назад

      @@NicholasRenotte Thank you so much for your reply! I will try your suggestion and let you know if it worked. Thank you! By the way do you know any tutorial on how to connect Personality Insights to Watson Conversation? Thanks!

  • @ashwinikanase3664
    @ashwinikanase3664 5 лет назад +1

    hi, i am getting error for PersonalityInsightsV3, when i am accessing it through service. Its telling me, PersonalityInsightsV3 is deprecated, ans watson-developer-cloud moved to ibm-watson. Please tell me what do i do, i stuck on this step: service = PersonalityInsightsV3(url=url, version='2017-10-13', iam_apikey=apikey)

    • @NicholasRenotte
      @NicholasRenotte  5 лет назад

      Just worked out what this is, it looks like the watson_developer_cloud module is being deprecated. Try this code instead:
      At the terminal:
      pip install ibm-watson
      In your notebook:
      from ibm_watson import PersonalityServiceV3
      service = PersonalityInsightsV3(url=url, version='2017-10-13', iam_apikey=apikey)

    • @ashwinikanase3664
      @ashwinikanase3664 5 лет назад

      @@NicholasRenotte thank you for reply. this worked.
      But now i am getting error at :
      ​profile = service.profile(text, content_type='text/plain').get_result()
      its giving me error:
      TypeError: profile() missing 1 required positional argument: 'accept'
      what do i do?
      I also tried file uploading method also, thats not working either.
      myfile = open(r'C:\Users\Home\AppData\Local\Programs\Python\Python37\Scripts\profile.txt')
      ----> 2 profile = service.profile(myfile.read(), content_type='text/plain',).get_result()
      TypeError: profile() missing 1 required positional argument: 'accept'
      same for file upload method

    • @SamRomain
      @SamRomain 5 лет назад

      @@ashwinikanase3664 Same issue here.

    • @NicholasRenotte
      @NicholasRenotte  5 лет назад

      @@ashwinikanase3664 this is a recent change, remove content_type='text/plain' and change it to accept='application/json'

    • @ashwinikanase3664
      @ashwinikanase3664 4 года назад

      @@NicholasRenotte hey hi
      recently i am updating my this script.
      and tried to run.
      now its giving me error on service
      ---------------------------------------------------------------------------
      TypeError Traceback (most recent call last)
      in
      ----> 1 service = PersonalityInsightsV3(url='url', version='2017-10-13', iam_apikey='apikey')
      TypeError: __init__() got an unexpected keyword argument 'url'
      what do i do now?

  • @XH-92
    @XH-92 5 лет назад +1

    Thanks a lot for your tutorial. I am just stuck on one thing. I am sure my API key is correct, same as the url.
    NameError Traceback (most recent call last)
    in
    ----> 1 service = PersonalityInsightsv3(url=url, version='2017-10-13', iam_apikey=apikey)
    NameError: name 'PersonalityInsightsv3' is not defined
    Is there anyone who can help me out?

    • @NicholasRenotte
      @NicholasRenotte  5 лет назад +1

      Hey there! Looks like you might not have imported the library. Try adding this line before you create the service:
      from ibm_watson import PersonalityInsightsv3

    • @XH-92
      @XH-92 5 лет назад +1

      Nicholas Renotte Thanks, Im going to check it out right away.

  • @nimit172007
    @nimit172007 4 года назад +1

    Can we use this on LinkedIn profiles?

    • @NicholasRenotte
      @NicholasRenotte  4 года назад

      You sure can, looks like you can use the LinkedIn articles API to grab text. Check this out: docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/articles-api

  • @eduU13
    @eduU13 5 лет назад +1

    Hi! I am working about connecting with personality insights although the last message was in image classifier.
    when i type the input 6 (service = ....) I see this message:
    /Users/eduardtevi/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:1: DeprecationWarning: PersonalityInsightsV3 is a deprecated function. watson-developer-cloud moved to ibm-watson
    """Entry point for launching an IPython kernel.
    Do you know which is the non deprecated function?
    Thanks in advance.

    • @NicholasRenotte
      @NicholasRenotte  5 лет назад

      Just worked out what this is, it looks like the watson_developer_cloud module is being deprecated. Try this code instead:
      At the terminal:
      pip install ibm-watson
      In your notebook:
      from ibm_watson import PersonalityServiceV3
      service = PersonalityInsightsV3(url=url, version='2017-10-13', iam_apikey=apikey)

    • @eduU13
      @eduU13 5 лет назад

      Thank you very much!@@NicholasRenotte I see there's something still wrong. I will try to fight it this week.

    • @NicholasRenotte
      @NicholasRenotte  5 лет назад

      @@eduU13 Hey there, looks like there were some changes to the Python package. I've updated the blog post and run through the code myself this morning! Should all work now. Happy coding :)

  • @SamRomain
    @SamRomain 5 лет назад +1

    Has anyone got this to work since updates came out?

    • @NicholasRenotte
      @NicholasRenotte  5 лет назад

      Hey Sam, working on the updates as we speak!

    • @SamRomain
      @SamRomain 5 лет назад +1

      @@NicholasRenotte Amazing

    • @SamRomain
      @SamRomain 5 лет назад +1

      @@NicholasRenotte Seems to have to deal with the header types?

    • @NicholasRenotte
      @NicholasRenotte  5 лет назад

      @@SamRomain still digging into it atm. Pretty sure it's just an update to the python SDK, shouldn't be too bad to get up and running. Worst case scenario I'll write up how to hit the API directly using requests.

    • @NicholasRenotte
      @NicholasRenotte  5 лет назад

      Hey Sam, try changing the content_type parameter and instead pass this to the profile method: accept='application/json'. Blog post is updated to show the changes! www.nicholasrenotte.com/how-to-develop-customer-profiles-using-ibm-watson-personality-insights/