This example diet app is a React Native application that generates personalized diet plans based on user's BMI and body features using OpenAI's machine learning algorithms. The app is built with React Native framework and integrated with OpenAI's package to retrieve diet plans in JSON format from the AI model. The generated diet plans are then displayed in the app's UI with a custom React Native component.
Installation Usage Contributing LicenseBefore running the app, make sure you have the following software installed on your machine:
Node.js v14.0 or higher React Native CLIOnce you have these dependencies installed, follow these steps to install the app:
Step 1. Clone the repository to your local machine:
git clone https://github.com/curiosum-dev/openai-example-app-blog-post
Step 2. Change into the app directory:
cd your-diet-app
Step 3. Install the app dependencies:
npm install
Step 4. Install OpenAI package:
Install the OpenAI package by following the instructions provided in the official OpenAI documentation: https://beta.openai.com/docs/api-reference/installation
To run the app on your local machine, follow these steps:
Step 1. Open a terminal and change into the app directory:
cd your-diet-app
Step 2. Start the Metro bundler:
npx react-native start
Step 3. Open another terminal and start the app on an Android or iOS simulator:
npx react-native run-android
or npx react-native run-ios
Step 4. Once the app is running on the simulator, you can use it to generate personalized diet plans based on your BMI and body features.
If you find a bug or want to contribute to the app, feel free to open an issue or submit a pull request.
This app is licensed under the terms of the MIT license.