Image Generator that allows create realistic images and art from a description in natural language.
- Available functions:
- Create images from description text.
- Download and share image.
- Save image in gallery.
- Dark/Light mode.
- Support platform: Web, Windows, Android.
- Technology:
- Flutter v3.7.3
- Dart v2.17.5
- API: DALL-E OpenAI
For Web | For App |
---|---|
https://github.com/CK1412/image_generator
Assuming you already have a runtime environment for Flutter
-
Clone this project and open with Visual Studio Code.
-
Create API_KEY from Open AI
-
Create a file named .env in the root of your project and add the following line to store your API key:
API_KEY=[YOUR_API_KEY]
The commands below will be run on Terminal of VSCode.
-
To install dependences, run:
flutter pub get
-
Run code-generators:
flutter packages pub run build_runner build --delete-conflicting-outputs
I have configured for two environments: development and production. Here ?> are the running instructions for the development environment.
-
Now, run the project:
flutter run --flavor development --target lib/main/main_development.dart
-
Alternatively you can run it manually.
Note: Do not use environment variables in .env file when building web.
- This is a CORS error. To fix it go to CORS-ANYWHERE.
- The site will not display the content because the API_KEY value is set in the
.env
file. So don't use the .env file but put the API_KEY value directly in the code then proceed to build the web.