Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding new Bing Image Search quickstart sample #16

Merged
merged 2 commits into from
Sep 10, 2018

Conversation

aahill
Copy link
Contributor

@aahill aahill commented Aug 30, 2018

Purpose

  • ...
    This sample adds a new Bing Image Search code sample to compliment upcoming documentation changes on docs.microsoft.com

Does this introduce a breaking change?

[ ] Yes
[ x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [https://github.com/aahill/cognitive-services-python-sdk-samples.git]
cd [cognitive-services-python-sdk-samples/samples/search/]
git checkout [new-quickstart]
run image-search-quickstart.py
  • Test the code

What to Check

Verify that the following are valid

  • ...
    That the application outputs strings from a Bing Image Search query.

Other Information

Copy link
Contributor

@lmazuel lmazuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aahill for your contribution!
However, there is already a sample:
https://github.com/Azure-Samples/cognitive-services-python-sdk-samples/blob/master/samples/search/image_search_samples.py

If yours brings new scenario, please add it in this last file.
Thanks!

@aahill
Copy link
Contributor Author

aahill commented Aug 31, 2018

Hi @Imazuel, thanks for the response!

I saw the file, but I need to create a new sample to support upcoming updates in the documentation. I've written a 5-minute quickstart that goes through this sample, scoping it to a single user task to generate interest for more fully-featured docs,tutorials, and samples (like the one you mention). Is that alright?
Cheers!

@lmazuel
Copy link
Contributor

lmazuel commented Aug 31, 2018

@aahill As a customer using this repo, I think it's confusing :/
Could we discuss this by email with our PM @kirthik ?
Thank you

@@ -0,0 +1,27 @@
from azure.cognitiveservices.search.imagesearch import ImageSearchAPI
from azure.cognitiveservices.search.imagesearch.models import ImageType, ImageAspect, ImageInsightModule
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this line at all

"""
client = ImageSearchAPI(CognitiveServicesCredentials(subscription_key))

try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the try/except, which is not required here

from msrest.authentication import CognitiveServicesCredentials

subscription_key = "Enter your key here"
search_term = "canadian rockies"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this variable (not used)

@lmazuel lmazuel merged commit 249bbf7 into Azure-Samples:master Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants