Skip to content

📋 Progressive Web App to using AI API to find images

Notifications You must be signed in to change notification settings

AndrewJBateman/angular-pwa-eslint

Repository files navigation

⚡ Angular PWA ESLint

  • Progressive Web App using ChatGPT to generate images

  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

📄 Table of contents

📚 General info

  • Progressive Web App to deliver enhanced capabilities, reliability, and installability while reaching anyone, anywhere, on any device with a single codebase.

📷 Screenshots

Example screenshot

📶 Technologies

💾 Setup

  • Install dependencies using npm i
  • Get yourself a ChatGPT API key and Organisation ID from openai.com
  • Run npm run lint:fix to lint app & fix errors
  • Run npx prettier --write . to apply prettier rules to ALL files, except those listed in .prettierignore
  • Run npx prettier --check . to check all files using prettier rules
  • Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

💻 Code Examples

  • 'ai-search.component.ts' method to search for AI image
ngOnInit(): void {
		const requestImage: ImageRequest = {
			prompt: "A live salmon with a funny face",
			n: 1,
			size: "256x256"
		};

		this.imageService
			.fetchImageFromPrompt(requestImage)
			.pipe(
				tap((res) => console.log("res: ", res, typeof res)),
				map((res: any) => res.body),
				map((image) => image.data),
				filter((images) => images.length != 0)
			)
			.subscribe((images) => {
				this.generatedImage = images[0].url;
			});
	}

🆒 Features

  • Uses ChatGPT to search for images

📋 Status & To-Do List

  • Status: Working
  • To-Do: Add more ChatGPT search types, correct AI search result model 'Result' in 'image.ts' file

👏 Inspiration

📁 License

  • This project is licensed under the terms of the MIT license.

✉️ Contact

  • Repo created by ABateman, email: gomezbateman@yahoo.com

About

📋 Progressive Web App to using AI API to find images

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published