Git Product home page Git Product logo

visada_py's Introduction

Visada API Python Client

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)

Initialization

$ python setup.py install
$ python

import visada.client

# Instantiate the API object with your API key
api_client = visada.client.VisadaAPI(<YOUR API KEY>)

Usage - Review Summarization

# 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.

visada_py's People

Contributors

ijt avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.