Important
Created by Preternatural AI, an exhaustive client-side AI infrastructure for Swift.
This project and the frameworks used are presently in alpha stage of development.
A simple app to upload an image to OpenAI Vision for analysis. If the item is food we will gather the pros, cons, type & overall summary about the food.
1. Download and open the project
2. Add your OpenAI API Key in the `MealController` file:
// MealController
private let openAIClient = OpenAI.Client(apiKey: "YOUR_API_KEY")
You can get the OpenAI API key on the OpenAI developer website. Note that you have to set up billing and add a small amount of money for the API calls to work (this will cost you less than 1 dollar).
- Run the project on your iPhone. Note that you'll need to use the Camera, so run on device.
- Take a picture of your food to get the health details:
export2.mov
*Note: Subscription handling needs more logic to work as intended.
The HealthApp is developed to demonstrate the the following key concepts:
- Using OpenAI's Vision API for photo analysis
The following Preternatural Frameworks were used in this project:
- AI: The definitive, open-source Swift framework for interfacing with generative AI.
This package is licensed under the MIT License.