/PIKU_ai_api

PIKU is an implementation of Deeplearning Model with Tensorflow and Flask and has it's own API features.

Primary LanguagePythonApache License 2.0Apache-2.0

piku-logo

Piku API with flask

GET REPLAY FROM PIKU - TENSORFLOW CHATBOT WITH API

API Version Version piku

Usages · Report Bug · Request Feature

🧬PIKU is an implementation of Deeplearning Model with Tensorflow and Flask

API Feature implemented with Flask

About The Project

PIKU is a chatboot which can reply to your Question with the help of Deeplearning and tensorflow library. Also it can be diployed to Heroku directly with the help of Gunicorn.

⛱️Features

  • Direct conversetion
  • API Feature
  • On web(For embed code)

ℹ️ Documentetion and Info

Getting Started

Piku can run on your local machine,Cloud Sever or You can use redimate API

🧿Ignore if you want to use the redimate API . See Usages for Simple Use

⚠️Prerequisites

Full list Avilabe in requirements.txt file.

  • TensorFlow == 1.8.0
  • Tflearn ==0.3.2
  • Python == 3.6.10
  • Nltk == 3.3
  • Numpy == 1.16.4(To avoid Wornings)
  • Flask
  • Flask-SqlAlchemy

To install All prerequisites, nevigate to Project Folder. Then:

pip install -r requirements.txt

💽Installation

🖥️Local Machine Installation

Clone or Download the Repo

git clone https://github.com/utshomax/piku_ai.git
  1. Install All Prerequisties First

  2. Nevigate to project folder

  3. Train piku

python train.py
  1. Strat App
python app.py

App will run on your computer's ip address with the port 5000

To get your IP:

Windows User:

https://support.microsoft.com/en-in/help/4026518/windows-10-find-your-ip-address

Mac User:

https://www.macworld.co.uk/how-to/mac/ip-address-3676112/

Linux User:

You know that

codecov

☁️Heroku Deploy

Download of clone the Repo and Follow the instruction from bellow link to deploy using Heroku CLI.

Instructions

🧩Usage

🤵Developer

1. Get a API key at http://getpiku.ml

2. Getting a reply from piku:

Method:GET

https://pikuapi.herokuapp.com/conv/your_api_key?getReply=your_message

Response:JSON

{
  "reply": "a_reply_from_piku"
}

Example:

https://pikuapi.herokuapp.com/conv/UgbnTrbkKPRqJt0wEEFqyGRbv2w?getReply=hi

Response:JSON

{
  "reply": "Hi there, how can I help?"
}

👨‍💻Advenced Developer(On local machine)

Replace your_ip_address with your ip address

1. Get a API key at https://pikuapi.herokuapp.com

2. Getting a reply from piku:

Method:GET

https://your_ip_address_with_port/conv/your_api_key?getReply=your_message

Response:JSON

{
  "reply": "a_reply_from_piku"
}

Example:

http://192.168.198.104:5000/conv/UgbnTrbkKPRqJt0wEEFqyGRbv2w?getReply=hi

Response:JSON

{
  "reply": "Hi there, how can I help?"
}

3. Getting your info:

Method:GET

http://192.168.198.104:5000/info/your_api_key

Response:JSON

{
  "user": {
    "api_key": "your_api_key",
    "password": "your_password",
    "username": "your_uusername"
  }
}

Example:

http://192.168.198.104:5000/info/UgbnTrbkKPRqJt0wEEFqyGRbv2w

Response:JSON

{
  "user": {
    "api_key": "UgbnTrbkKPRqJt0wEEFqyGRav2w",
    "password": "123456",
    "username": "utsho"
  }
}

4. Createing A User

Method:POST

http://192.168.198.104:5000/reg?uname=your_username&password=your_password

Response:JSON

{
  "api": "your_api_key",
  "message": "user created!"
}

For more follow the Documentation

Save your API key in a safe place.

📝TO DO

  • Add More Training Data
  • API Intrigation with Flask
  • Getting user API with username and password
  • User Registration with API
  • Fontend For train with custom training data
  • Web Interface
  • Android App Interface
  • Try with Django
  • On web(embed code)
  • Desktop GUI

🛠️Contributions

Feel free to contribute

⚖️License

Distributed under the Apache License 2.0 . See LICENSE for more information.

📧Contact

Utsab Utsho - FACEBOOK - utsho9009@gmail.com

Project Link: https://github.com/utshomax/piku_ai

#Soutout

Timothy Ruscica - For his awesome playlist on his youtube chanel.