-
Install the necessary libraries: tensorflow, matplotlib, sklean, numpy, PIL, pickle by typing in pip install in the terminal for each of the above mentioned libraries.
-
Run the model.py file. This will train the image captioning model and create the .ckpt file which will be used by our api. To run the model.py file, type python model.py in the command line.
-
Go to text_gen/im2txt/im2txt/run_inference.py
-
Edit lines 47 and 48 to paths where you have created the .ckpt and the .vocab file.
-
Go to /api folder
-
Start the backend server by typing python app.py in the terminal. This will start a local server at PORT 5000
-
In the terminal, navigate to the /ui folder, and type npm install in the terminal. This will install the required dependencies.
-
Then, type npm run in the terminal, this will start the ui in a local server at PORT 3000.
- Open a browser window and type localhost:3000 This will show the website.