Skip to content

Latest commit

 

History

History
94 lines (65 loc) · 3.32 KB

README.md

File metadata and controls

94 lines (65 loc) · 3.32 KB

openaiimages

A sample React app for Tauri version 2

Donate Paypal Donate Venmo GitHub Downloads (all assets, all releases)

Author: Jason Levitt

Initial Release Date: February 28th, 2024

openaiimages demonstrates Tauri version 2's ability to take a React frontend and use it to develop desktop and mobile apps for multiple platforms using only one code base. You can develop for MacOS, Windows, Linux, Android, and iOS.

MacOS

MacOS

Building The App

For prerequisites, see this page: Tauri prerequisites

Note that iOS development requires a Mac (sorry).

After you clone this repo:

$ cd openaiimages

Install the Javascript packages (this is a typical React step)

$ yarn

Then, to build and launch the desktop version (tested on MacOS and Windows):

$ yarn tauri dev

To build and launch the Android version:

$ yarn tauri android init
$ yarn tauri android dev

To build and launch the iOS version:

$ yarn tauri ios init
$ yarn tauri ios dev

Using The App

This sample app requires an OpenAI API key in order to do anything interesting. You can get a free key, with $5 USD of free usage which is enough to generate over 100 images, by signing up here [no credit card required]:

In the app, click on the gear in the lower left-hand corner to add your API key. Once you've added your OpenAI API key, simply type a prompt into the text box and click on the "Create Image" button. When the image is loaded, which usually takes about 15 seconds, there are two other features for the desktop app (Windows/Linux/MacOS):

- Rolling over the image will reveal a tooltip containing the "revised prompt" if OpenAI returned one.

- Clicking on the image will bring up a "Save As" dialog.

On iOS, you can right-click on the image to see the tooltip.


iOS iOS Android Android

Windows 10

Windows 10

For a list of some Tauri apps and plugins, check out this Github link