A bare-bones prototype to detect code, extract it from a specific frame, and display it to the user in the appropriate format.
Built using Svelte and Django REST Framework.
Visit video2code.xyz
- Groq AI API key
- Tesseract OCR Installer (WINDOWS ONLY)
I have created a docker compose file that you can run the application locally which will get the application running in no time! Simply do the following:
docker compose -f docker-compose-local.yml up
(WINDOWS ONLY) PLEASE TAKE NOTE OF WHERE YOU INSTALL TESSERACT.EXE AS YOU WILL NEED TO SET THE PATH IN THE DJANGO APPLICATION.
If you are on Windows, download the installer for Windows for Tesseract from Tesseract at UB Mannheim.
If you are on Linux, you can install Tesseract through the terminal using apt-get install tesseract-ocr.
For other operating systems, please follow the instructions from Tesseract's documentation here.
The server was built using Django REST Framework. It currently stores the video that will be served to the frontend via the REST API. The extraction of a specific video frame and resulting code is done here. To setup the server, run the following:
- Setup a virtual environment within the server folder (place it on the same level as project folder, .gitignore, and requirements.txt)
python -m venv .venv
- Activate virtual environment
source .venv/Scripts/activate
- Install project dependencies (make sure you are in the server directory)
pip install -r requirements.txt
- Set up environment variables
GROQ_KEY=YOUR_KEY
TESSERACT_PATH=YOUR_PATH (WINDOWS ONLY, IF YOU ARE ON LINUX TESSERACT OCR IS ALREADY ADDED TO YOUR PATH)
- Start project
cd adv_ui_ocrroo_project
python manage.py runserver
The repository holds both the client (frontend) and server (backend) for the project. The client was built using Svelte. To setup the client, run the following:
- Install project dependencies
npm install
- Start client development server:
npm run dev
If you are using VS Code, for better developer experience, please feel free to install the Svelte language support extension.
