A bot for the popular mobile game HQ Trivia
./bot.py -v -i test_question2.png
Busking (Verb) - the act of performing in public places for gratuities. In many countries the rewards are generally in the form of money.
- Install requirements
pip install -r requirements.txt
-
Enable API's in Google Cloud. Go to Google Cloud. Enable Google Cloud Natural Language API, Google Cloud Custom Search API and Google Cloud Vision API.
-
Go to Google Cloud Credentials Page and download the JSON file.
-
Set
GOOGLE_APPLICATION_CREDENTIALS
in the config file to the path of where you saved the JSON file. -
Create a new (Custom Search Engine)[https://cse.google.com/cse/all]. Enter
www.anyurl.com
in the sites to search input. ClickCreate
. Then clickModify your search engine
, then go down toSites to search
and under advanced change fromSearch only included sites
toSearch the entire web but emphasize included sites
. -
Set
customsearch_id
in the config file to your search engine ID found under the detials section of CSE. -
Set
developerKey
in the config file to your Developer API Key found in the Credentials Page -
Try it:
./bot.py -v -i test_question2.png
HQBot depends on the following Python 2.7 modules:
google-cloud-vision
google-cloud-language
google-api-python-client
This is using a Google Custom Search to try and predict the best possible answer. Answers may not be 100% correct but know my HQBot tried its best.