contact@digitalnotebooks.co
Stay Organized, Stay Inspired. Let's Write.

Creating Plant Analysis Tools Using Gemini AI and Express.js

Back To All Notes
  • Notebook: Django Project: Car Listing
  • Speaker:
  • Date Created: Sept. 14, 2024, 10:50 p.m.
  • Owner: Rosilie

We installed the NODE.JS (Javascript) for this project. You need to download from here

Node.js for Javascript and Django for Python are 2 different platforms.

Project's Main Resource Page: YouTube video here.

1. Open a new folder, PLANTANALYSISTOOL. Open a new Git bash terminal, and we issue the command, CODE . (code dot) to open the folder in VS Code.

We install the extension CODEIUM AI. 

2.  We issue the command for Node.js the NPM (which is PIP in Django) to create the PACKAGE.JSON file.

$ npm init --yes

3.  We install the packages we need.

$ npm i express dotenv multer pdfkit

4.  Get GEMINI API KEY. Simply in the Google search, type GEMINI API. 

5. Update the PACKAGE.JSON:

FROM:

TO:

6.We created files APP.JS and .ENV files in the root directory.

In the APPS.JS:

7. On Google AI Dashboard, select API REFERENCE, choose NODE.JS and get the code to install GEMINI API

8. Install the GEMINI API SDK in the terminal:

$ npm install @google/generative-ai

9.  We copy this from the GEMINI API REFERENCE into our APPS.JS

10.  We updated our APPS.JS AS:

11. To test our work, run NODE --WATCH APP (where app is our APP.JS)

Then use POSTMAN (or INSOMNIA) or add an extension THUNDER CLIENT as a VSCODE extension to test the ENDPOINT WITHIN VS CODE.

12. 

 



No PDF file attached.

Notebook
Notebook Details
Title: Django Project: Car Listing
Category: Udemy Django Course