An open API service indexing awesome lists of open source software.

https://github.com/nneji123/wordsai

A collection of NLP Applications built using FastAPI, HTML, CSS, and Streamlit.
https://github.com/nneji123/wordsai

chatbot docker docker-compose fastapi git githubactions gitpod heroku-deployment nlp-machine-learning optical-character-recognition resumeparser sentiment-analysis speech-recognition speech-to-text testing text textsumarizer translation

Last synced: about 1 month ago
JSON representation

A collection of NLP Applications built using FastAPI, HTML, CSS, and Streamlit.

Awesome Lists containing this project

README

        



[![Language](https://img.shields.io/badge/Python-darkblue.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
[![HTML](https://img.shields.io/badge/HTML-black.svg?style=flat&logo=html5&logoColor=white)](http://wordsai-app.herokuapp.com)
[![CSS](https://img.shields.io/badge/CSS-yellow.svg?style=flat&logo=css3&logoColor=white)](http://wordsai-app.herokuapp.com)
[![Framework](https://img.shields.io/badge/FastAPI-darkgreen.svg?style=flat&logo=fastapi&logoColor=white)](https://wordsai-api.herokuapp.com/docs)
[![Framework](https://img.shields.io/badge/Streamlit-darkred.svg?style=flat&logo=streamlit&logoColor=white)](https://share.streamlit.io/nneji123/lung-cancer-prediction/main)
![hosted](https://img.shields.io/badge/Heroku-430098?style=flat&logo=heroku&logoColor=white)
![Docker](https://img.shields.io/badge/Docker-blue?style=flat&logo=docker&logoColor=white)
[![Gitpod](https://img.shields.io/badge/Gitpod-orange?style=flat&logo=gitpod&logoColor=white)](https://gitpod.io/#https://github.com/Nneji123/WordsAI)
![reposize](https://img.shields.io/github/repo-size/Nneji123/WordsAI)
[![Deploy](https://github.com/Nneji123/WordsAI/actions/workflows/deploy.yml/badge.svg)](https://github.com/Nneji123/WordsAI/actions/workflows/deploy.yml)
[![CodeQL](https://github.com/Nneji123/WordsAI/actions/workflows/codeql.yml/badge.svg)](https://github.com/Nneji123/WordsAI/actions/workflows/codeql.yml)
[![tests](https://github.com/Nneji123/WordsAI/actions/workflows/python-app.yml/badge.svg)](https://github.com/Nneji123/WordsAI/actions/workflows/python-app.yml)

## About
>WordsAI is a collection of NLP/text and audio based applications served as APIs using the FastAPI framework.

HTML Web App: http://wordsai-app.herokuapp.com

API Documentation: http://wordsai-api.herokuapp.com

Streamlit App: https://nneji123-wordsai-streamlithome-x32anq.streamlitapp.com/

## Table of Contents
* [About](#about)
* [Table of Contents](#table-of-contents)
+ [Features](#features)
* [Repository File Structure](#repository-file-structure)
* [Demo](#demo)
+ [API Demo](#api-demo)
+ [HTML App Demo](#html-app-demo)
+ [Streamlit App Demo](#streamlit-app-demo)
* [How to run the Application](#how-to-run-the-application)
* [Tests](#tests)
* [Deployment](#deployment)
- [Todo](#todo)
- [License](#license)

### Features
- Speech Recognition
- Auto Correct
- Machine Translation across multiple languages
- Resume Parser
- Text Summarizer
- Webpage Summarizer
- Sentiment Analyzer
- Optical Character Recognition or OCR(extract text from images)
- Named Entity Recognizer
- Chatbot
- Wordcloud Generator

## Repository File Structure
```bash
├───.github
│ └───workflows #Github Actions
├───api #FastAPI Application
│ ├───images
│ ├───temp
│ └───train_bot
├───src #HTML Web Application
│ ├───images
│ ├───temp
│ ├───templates
│ │ └───assets
│ └───__pycache__
├───streamlit #Streamlit Application
│ ├───functions
│ ├───images
│ ├───pages
│ └───temp
└───tests #Tests
```

## Demo
### API Demo
### HTML App Demo
### Streamlit App Demo

## How to run the Application

Running on Local Machine

**To run the application on your local system do the following:**
1. Clone the repository:
```bash
git clone https://github.com/Nneji123/WordsAI.git
```

2. Change the directory:
```
cd WordsAI
```

3. Install the requirements:
```
pip install -r requirements.txt
```

4. Run the application
```
uvicorn app:app --reload --port 8000
```
**You should be able to view the application by going to http://127.0.0.1:8000/**


Running on Local Machine with Docker Compose

**You can also run the application in a docker container using docker compose(if you have it installed)**

1. Clone the repository:
```bash
git clone https://github.com/Nneji123/WordsAI.git
```

2. Change the directory:
```
cd WordsAI
```

3. Run the docker compose command
```docker
docker compose up -d --build
```
You should be able to view the application by going to http://localhost:8000/


Running in a Gitpod Cloud Environment

**Click the button below to start a new development environment:**

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/Nneji123/WordsAI)

## Tests

Test HTML Web App Functions

To test the HTML Web app do the following:
1. Clone the repository:
```
git clone https://github.com/Nneji123/WordsAI.git
```
2. Change the working directory and install the requirements and pytest:
```
cd src && pip install -r requirements.txt && pip install pytest
```
3. Move to the tests folder and run the tests
```
cd .. && cd tests && pytest
```


Test API

To test the API functions do the following:
1. Clone the repository:
```
git clone https://github.com/Nneji123/WordsAI.git
```
2. Change the working directory and install the requirements and pytest:
```
cd api && pip install -r requirements.txt && pip install pytest
```
3. Move to the tests folder and run the tests
```
cd .. && cd tests && pytest
```

## Deployment


Deploying the Application to Heroku

**Assuming you have git and heroku cli installed just carry out the following steps:**

1. Clone the repository:
```bash
git clone https://github.com/Nneji123/WordsAI.git
```

2. Change the directory:
```
cd WordsAI
```

3. Login to Heroku

```
heroku login
heroku container:login
```

4. Create your application
```
heroku create your-app-name
```
Replace **your-app-name** with the name of your choosing.

5. Build the image and push to Container Registry:

```
heroku container:push web
```

6. Then release the image to your app:

```
heroku container:release web
```

Click the button below to deploy the application.

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)


How to deploy the application on AWS EC2 using a Bash Script

**1. Fork this repository**

**2. Login to AWS, create a new AWS EC2 instance and make sure to allow outside traffic as shown in the screenshots below:**

**3. When the instance has been launched, copy the Public IP address of your instance and paste it in the 'fastapi_setup' file of your cloned repository as shown below**

**4. Connect to your instance and clone your forked repository, an example in my case:**
```bash
git clone https://github.com/Nneji123/WordsAI.git
```
**5. cd into your repository which is probably named 'WordsAI'. You can do that by running:**
```bash
cd WordsAI
```
**6. Then run the setup.sh file to get your application up and running:**
```bash
chmod u+x aws.sh
./aws.sh
```
**You can then view the application by going to your Public IP's location, an example in my case will be:
http://3.95.202.74:80/docs**

**You can also watch this video for a more in depth explanation on how to deploy a FastAPI application on AWS EC2:**
[![How to deploy FastAPI on AWS](https://youtube-md.vercel.app/SgSnz7kW-Ko/640/360)](https://www.youtube.com/watch?v=SgSnz7kW-Ko)

# Todo
- [x] Add a frontend interface for the APIs with streamlit and html, css , javascript
- [ ] Add more interesting features like; title generator and song finder, text2speech, pdf text extractor, spam detection etc
- [x] Add functional chatbot
- [x] Add wordsai discord bot
- [x] update tests

# License
[Apache](https://github.com/Nneji123/WordsAI/LICENSE.md)