A React application that enhances images using AI technology.
- Upload images from your device
- Preview original and enhanced images side by side
- Real-time AI enhancement processing with loading indicators
- React.js for the UI components
- Tailwind CSS for styling
- Vite as the build tool and development server
- Axios for API communication
- Clone the repository
- Install dependencies:
npm install - Install axios:
npm i axios --save - Create a
.envfile in the root directory with the following variables:VITE_MY_API_KEY = "your_api_key" VITE_BASE_URL = "https://techhk.aoscdn.com/" - Start the development server:
npm run dev - Open your browser and navigate to the local server address shown in your terminal
src/components/- React components including ImageUpload and ImagePreviewsrc/utils/- Utility functions including the API integration
- Users upload an image through the interface
- The application sends the image to an AI enhancement API
- The application polls the API for the enhanced image
- Once processing is complete, the enhanced image is displayed alongside the original
The application uses an external AI service for image enhancement. The API communication is handled in enhancedImageAPI.js, which:
- Uploads the image to the API
- Retrieves a task ID
- Polls the API until the enhanced image is ready
- Returns the enhanced image URL
VITE_MY_API_KEY: Your API key for the enhancement serviceVITE_BASE_URL: The base URL for the API endpoints
- The API has a maximum retry limit of 20 attempts when polling for results
- Large images may take longer to process
- AnishGane @ 2025