An app that uses Clarifai Api to detect the face in an image from an URL. Backend and Frontend are hosted on Heroku.
git clone https://github.com/blackphoenix42/Smart-Brain-Server.git
- Install the dependencies
npm install
-
Download and install PostgreSQL🐘
-
Create database
smart-brain
or any of your choice. -
Create following tables:
Login:
CREATE TABLE login(
id serial PRIMARY KEY,
hash varchar(100) NOT NULL,
email text UNIQUE NOT NULL
)
Users:
CREATE TABLE users(
id serial PRIMARY KEY,
name VARCHAR(100),
email text UNIQUE NOT NULL,
entries BIGINT DEFAULT 0,
joined TIMESTAMP NOT NULL
)
- In
./server.js
file update the following:
const db = require("knex")({
client: "pg",
connection: {
host: "127.0.0.1",
user: "postgres",
password: "test123", //Whatever Password You set in Postgres
database: "smart-brain", // Name of Your Database
},
});
-
Now go to Clarifai and sign up. You will be provided with a default
my-first-application
. Copy its API KEY. -
Now go to
./controllers/image.js
and change the following function:
const app = new Clarifai.App({
apiKey: "YOUR API KEY",
});
- Start the server
npm start
- Take a look at the Existing Issues or create your own Issues!
- Check out CONTRIBUTING.md
blackphoenix42 👑 Admin |