Giter Site home page Giter Site logo

fairdataihub / alt-text-generator Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 2.0 369 KB

Generate alt text descriptions for images

Home Page: https://alt.fairdataihub.org

License: MIT License

Shell 6.38% JavaScript 14.35% TypeScript 57.71% CSS 21.56%
ai alt-text image-recognition replicate

alt-text-generator's Introduction

Alt Image Generator

This project will generate relevant alt text for images using AI.

Alt Image Generator

How it works

It uses an ML modal from Salesforce called BLIP on Replicate to generate relevant alt text for images. You can feed the Next.js API route an image as a query param and it will return a one sentence description of that image.

Project setup

Make sure to install the dependencies.

yarn install

After cloning the repo, go to Replicate to make an account and put your API key in a file called .env.local.

Compiles and hot-reloads for development

Then, run the application in the command line and it will be available at http://localhost:3000.

yarn dev

How to use

To use the API route, go to the link below in your browser or run a curl command in your terminal to get a sample result. Feel free to replace the dub.sh link with a link to any image.

curl http://localhost:3000/api/generate?imageUrl=https://dub.sh/confpic

Compiles and minifies for production

Use this step to build a local production version of the site. Use start to preview the local build.

yarn build
yarn start

Requirements

  • Node.js >= 16.14.0
  • Yarn 1 (Classic)

Directory Structure

  • .github — GitHub configuration including the CI workflow.
  • .husky — Husky configuration and hooks.
  • public — Static assets such as robots.txt, images, and favicon.
  • pages — Application source code, including pages, components, styles.

Scripts

  • yarn dev — Starts the application in development mode at http://localhost:3000.
  • yarn build — Creates an optimized production build of your application.
  • yarn start — Starts the application in production mode.
  • yarn type-check — Validate code using TypeScript compiler.
  • yarn lint — Runs ESLint for all files in the src directory.
  • yarn format — Runs Prettier for all files in the src directory.

License

This project is licensed under the MIT License - see the LICENSE.md file for more information.

Note: You will not need to do anything to the hosted site. Continuous Delivery has been setup with Vercel. All you need to do is push your commit and wait for it to deploy.

Acknowledgements

A special thank you to Vercel for hosting this application.

alt-text-generator's People

Contributors

megasanjay avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fzmdesign okato7

alt-text-generator's Issues

Could not find a DOI in the README

DOI Checker 🔍

Status ℹ️

We went through the README in your repository and couldn't find any DOI references.

What you can do 💡

Add a DOI 📝

If you have a DOI for your software, please add it to your README. You can do this by adding a line like this to your README:

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.123456.svg)](https://doi.org/10.5281/zenodo.123456)

If you don't have a DOI yet, you can get one from platforms like Zenodo 📦, Figshare 📊 or DataCite 📚.

FAIRshare 🌟

To help you get started, we've created an application that you can use to upload your software to Zenodo and/or Figshare and get a DOI for it. You can find the application at fairdataihub.org/fairshare 🔍.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @types/react-dom to v18.3.0
  • chore(deps): update dependency eslint to v8.57.0
  • chore(deps): update dependency typescript to v5.4.5
  • chore(deps): update actions/checkout action to v4
  • chore(deps): update commitlint monorepo to v19 (major) (@commitlint/cli, @commitlint/config-conventional)
  • chore(deps): update dependency @types/node to v20
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-config-next to v14
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency lint-staged to v15
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/gitlab-sync.yml
  • actions/checkout v3
  • wangchucheng/git-repo-sync v0.1.0
npm
package.json
  • @commitlint/cli ^17.4.0
  • @commitlint/config-conventional ^17.4.0
  • @fairdataihub/config ^2.2.1
  • @semantic-release/changelog ^6.0.2
  • @semantic-release/commit-analyzer ^9.0.2
  • @semantic-release/git ^10.0.1
  • @semantic-release/github ^8.0.7
  • @semantic-release/npm ^9.0.1
  • @semantic-release/release-notes-generator ^10.0.3
  • @types/node 18.17.1
  • @types/react-dom 18.2.7
  • commitizen ^4.2.6
  • cz-conventional-changelog ^3.3.0
  • eslint ^8.31.0
  • eslint-config-next ^13.1.1
  • eslint-config-prettier ^8.6.0
  • eslint-import-resolver-typescript ^3.5.2
  • eslint-plugin-prettier ^4.2.1
  • husky ^8.0.0
  • lint-staged ^13.1.0
  • megasanjay-devmoji ^1.2.1
  • prettier ^2.8.1
  • prettier-plugin-tailwindcss ^0.2.1
  • semantic-release ^20.0.0
  • typescript 5.1.6

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.