This is the Python client for using the Visada API. You'll need to get an API key by signing up.
Here's what you can do with the API:
- Review summarization: extract reasons why reviewers liked or didn't like the entity being reviewed. Here's an example of a review summary which summarizes the reviews of this suitcase at Amazon.
- Face blemish removal (coming soon)
- Makeup simulation (coming soon)
$ python setup.py install
$ python
import visada.client
# Instantiate the API object with your API key
api_client = visada.client.VisadaAPI(<YOUR API KEY>)
# Create a new review set - you'll refer to it via its review_set_id
review_set_id = api_client.create_review_set()
# Add reviews to the review set; here's an example of adding reviews.
# A single review consists of the text of the review, and the score assigned to the review.
# You'll want to add as many reviews as possible to get the best possible summary.
api_client.add_review_to_review_set(review_set_id, 'This suitcase was so-so.', rating=3)
api_client.add_review_to_review_set(review_set_id, 'This suitcase was amazing.', rating=5)
api_client.add_review_to_review_set(review_set_id, 'This suitcase was terrible.', rating=1)
# Once you've added all your reviews, start the summarization process
status = api_client.start_review_set_summarization(review_set_id)
# Poll the API until the summarization process is finished
while True:
result = api_client.get_review_set_info(review_set_id)
if result['status'] != 'processing':
break
else:
time.sleep(5)
You can visualize the review summary via a special URL:
url = api_client.get_visualizer_url(review_set_id)
'''
Open the URL in your browser (just like the example above, [http://api.visada.io/review_sets/552ef4c6db5f093b870180be/visualize](http://api.visada.io/review_sets/552ef4c6db5f093b870180be/visualize)) to
see the result.