Skip to content

Commit

Permalink
TestAPI.py changes
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarRad committed Feb 18, 2018
1 parent 086c60c commit 9589d29
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Binary file modified __pycache__/getImage.cpython-36.pyc
Binary file not shown.
Binary file modified audioOutput.mp3
Binary file not shown.
Binary file modified snapShot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions testAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ def sendWebRequest(image_url):
for i in v_aReadings:
if i['description'][0].islower():
number_of_labels += 1
if v_aReadings[0]['score']>1:
text = "I could be wrong, but my best guess is that you're looking at "+ v_aReadings[0]['description']

if v_aReadings[0]['description'].lower() == "light":
text = "Hmmmm, I think I blinked. Please try again."
elif v_aReadings[0]['score']>1 or v_aReadings[0]['description'].lower() == v_aReadings[len(v_aReadings)-number_of_labels]['description']:
text = "This looks to me like you're looking at a "+ v_aReadings[0]['description']
else:
text = "I could be wrong, but my best guess is that you're looking at "+ v_aReadings[0]['description'] + " or perhaps maybe " + v_aReadings[len(v_aReadings)-number_of_labels]['description']
text = "I could be wrong, but my best guess is that you're looking at a "+ v_aReadings[0]['description'] + " or perhaps maybe " + v_aReadings[len(v_aReadings)-number_of_labels]['description']

readText(text)

0 comments on commit 9589d29

Please sign in to comment.