Skip to content

API built in Python using FastAPI and SQLAlchemy for NLP research project.

Notifications You must be signed in to change notification settings

jamesvovos/nlp-project-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NLP Project API.

Implementation using FastAPI & SQLAlchemy ORM.

ApiImage

Installation Guide

1. Install FastAPI

Install FastAPI

$pip install fastapi

2. Install Uvicorn

Install Uvicorn:

$pip install "uvicorn[standard]"

To run the server - cd/ into the project directory and run the command:

$uvicorn endpoints:app --reload

3. Install Pydantic

Install Pydantic:

$pip install pydantic

Features

  • API to add custom intents, tags, patterns & responses to AI model.
  • API to customize AI text-to-speech responses including: tone, personality, name, voice, etc.
  • Modify API endpoints to train model.
  • Can be built upon later to add NLP neural net model to games (mini plugin).

Customize

Have a look at Postman to checkout the API endpoints. Refer to the endpoints.py file to view/manage the API endpoints. Customize the database schema in the database/models.py file. Add in your own database integrations by replacing the SQLALCHEMY_DATABASE_URL = '' in the database/database.py file. Refer to SQLAlchemy documentation for further info based on the database provider you choose.

from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

# establish connection database using SQLAlchemy ORM
SQLALCHEMY_DATABASE_URL = ''

engine = create_engine(SQLALCHEMY_DATABASE_URL)

# the database session
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)

# base class to create a database model/table
Base = declarative_base()

License

MIT

About

API built in Python using FastAPI and SQLAlchemy for NLP research project.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages