VisionAPI - a Python library for GPT-Based Vision Models inference
Project description
VisionAPI 🚧
Hey there
This is a Work In Progress Project. The goal is to bring GPT-based Models to a simple API
How to use
Installation
pip install visionapi
Authentication
export OPENAI_API_KEY=<your key>
Image Inference
We can use an image url, local image path or numpy array to make an inference.
import VisionAPI
inference_endpoint = VisionAPI.Inference()
image = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
prompt = "Describe the image"
response = inference_endpoint.image_inference(image, prompt)
print(response)
Video Inference
import VisionAPI
inference_endpoint = VisionAPI.Inference()
prompt = "These are frames from a video that I want to upload. Generate a compelling description that I can upload along with the video."
video = "video.mp4"
response = inference_endpoint.video_inference(video, prompt)
print(response)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
VisionAPI-0.1.0.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file VisionAPI-0.1.0.tar.gz
.
File metadata
- Download URL: VisionAPI-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54509b05e6e2eb628ecdedd4b7299f631eac0948e68d2f9854bcbf2ef415ffe9 |
|
MD5 | 3c32c170e978d53601893b1130299c5f |
|
BLAKE2b-256 | 62beab27e091f9ded4c9c777ced55ce644c6c71be817c4db486b7a9d08eab639 |
File details
Details for the file VisionAPI-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: VisionAPI-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ddca94f8291f195e28b19aecca124c63eb2a5b2ebc949829b1952bbe8b99688 |
|
MD5 | 84a8248b04f45053fd8582d8c1e65cad |
|
BLAKE2b-256 | 84640dab59f02516c54cf87e984eef3f1f53e0513378529be9b91647cad7cbed |