SnapSpeak is your go-to platform for transforming images into captivating narratives. Our user-friendly interface allows for seamless image uploads, drag-and-drop functionality, and on-the-go capture using the Media Stream API. Choose between our Image Caption Generator or OCR for versatile text extraction.
Behind the scenes, our server processes images with precision, employing advanced techniques like py-tesseract OCR and a finely tuned model trained on the Flickr30K dataset.
The future of SnapSpeak is bright. We're expanding with MongoDB integration for image storage, Docker deployment, and scaling on Digital Ocean's Kubernetes. Jenkins ensures a smooth development pipeline.
Join us in revolutionizing visual communication with SnapSpeak. Let your images do the talking.
Final.Demo.mp4
Before you begin, make sure you have the following installed and set up on your system:
-
Tesseract OCR - Install Tesseract OCR for Windows using the installer: tesseract-ocr-w64-setup-5.3.3.20231005.exe.
-
Set the system PATH for Tesseract to
C:\Program Files\Tesseract-OCR
. -
Create a new system environment variable:
- Name:
TESSDATA_PREFIX
- Value:
C:\Program Files\Tesseract-OCR\tessdata
- Name:
- Write these commands in the terminal:
sudo apt-get update sudo apt-get install -y tesseract-ocr
-
Clone the repository:
git clone https://github.com/thisisankit27/SnapSpeak.git
-
Navigate to the project directory:
cd SnapSpeak cd MasterProject
-
Install the Python dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the same folder asmanage.py
. Add the following line to the.env
file:DEBUG=1 DJANGO_EXPOSE_PORT=8020 DJANGO_PROD_PORT=8001 SECRET_KEY=<your-secret-key> MONGODB_HOST=localhost MONGODB_EXPOSE_PORT=27017 MONGODB_PROD_PORT=27017 REDIS_PROD_PORT=6379 REDIS_EXPOSE_PORT=6379 CELERY_BROKER_URL = 'redis://localhost:6379/0'
Replace
<your-secret-key>
with a securely generated secret key for your Django application. You can use online tools or Django'sdjango.core.management.utils.get_random_secret_key()
method to generate a new key. Make sure to keep this key confidential and never share it publicly. -
Collect the static files:
python manage.py collectstatic
Run the following command to start the Django development server:
python manage.py runserver
or
gunicorn MasterProject.wsgi:application --bind 127.0.0.1:8000
Run the following command in seperate terminal:
celery -A MasterProject worker --loglevel=info --concurrency 1 -E
SnapSpeak can also be deployed using Docker for easier setup and portability. Follow these steps to run the application using Docker:
-
Make sure you have Docker installed on your system. If not, you can download and install Docker Desktop from Docker's official website.
-
Clone the repository:
git clone https://github.com/thisisankit27/SnapSpeak.git
-
Navigate to the project directory:
cd SnapSpeak cd MasterProject
-
Create a
.env
file in the same folder asmanage.py
. Add the following line to the.env
file:DEBUG=1 DJANGO_EXPOSE_PORT=8020 DJANGO_PROD_PORT=8001 SECRET_KEY=<your-secret-key> MONGODB_HOST=mongodb MONGODB_EXPOSE_PORT=27017 MONGODB_PROD_PORT=27017 REDIS_PROD_PORT=6379 REDIS_EXPOSE_PORT=6379 CELERY_BROKER_URL = 'redis://redis:6379/0' NGINX_EXPOSE_PORT=80 NGINX_PROD_PORT=80
Replace
<your-secret-key>
with a securely generated secret key for your Django application. You can use online tools or Django'sdjango.core.management.utils.get_random_secret_key()
method to generate a new key. Make sure to keep this key confidential and never share it publicly. -
Build and start the Docker containers using Docker Compose:
docker compose up --build
This command will build the Docker image and start the SnapSpeak application along with its dependencies.
-
Access the SnapSpeak application by visiting http://localhost:80 or http://localhost in your web browser.
The application should now be running in a Docker container, providing a convenient and isolated environment for SnapSpeak.
-
To stop the Docker containers, use the following command:
docker compose down
This will stop and remove the containers.
Note: Ensure that ports 8001 & 80 on your local machine are available and not occupied by another service before running Docker Compose. Adjust the docker-compose.yml
file if you need to change the port configuration.