https://github.com/avinash-acharya/feeditback
An AI based RAG web application for Generating Feedback Report
https://github.com/avinash-acharya/feeditback
flask nextjs ollama openai python rag tidb typescript
Last synced: 4 months ago
JSON representation
An AI based RAG web application for Generating Feedback Report
- Host: GitHub
- URL: https://github.com/avinash-acharya/feeditback
- Owner: Avinash-Acharya
- License: mit
- Created: 2024-08-23T15:58:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-25T22:26:42.000Z (almost 2 years ago)
- Last Synced: 2025-02-14T13:18:19.349Z (over 1 year ago)
- Topics: flask, nextjs, ollama, openai, python, rag, tidb, typescript
- Language: TypeScript
- Homepage:
- Size: 8.35 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# {Feed!tBack}
An AI based feedback collection and management system for Growing Businesses

_Figure 1: Process-Flow/Architecture Diagram_
## Getting Started
### Local Development
**Note**: The following steps are valid for only Windows OS
Prerequisites:
- `npm`
- `pip`
- `ollama`
Start with Cloning the repository
```bash
git clone https://github.com/Avinash-Acharya/FeeditBack.git
```
Navigate to the Root folder and install the necessary node packages
```bash
npm i
```
Now navigate to the /api folder and create an virtual environment and activate it
```bash
cd api
python -m venv myenv
myenv/Scripts/activate
```
Install the necessary Python Libraries
```bash
pip install -r requirements.txt
```
Create a `.env` file in the Root folder and add a field `TIDB_DATABASE_URL` and enter the TiDB Connection String which looks like `mysql+pymysql://{TIDB_USER}:{TIDB_PASSWORD}@{TIDB_HOST}:{TIDB_PORT}/{TIDB_DB_NAME}?ssl_verify_cert=True&ssl_verify_identity=True`
We will use ollama to run LLM models locally, So Install Ollama from [here](https://ollama.com/) and run the below command
```bash
ollama pull phi3:3.8b-mini-128k-instruct-q4_K_M
```
Note : We even provide an option for openAPI key intigration on Admin page, So you can skip running Ollama locally.
### Running Devlopment Server
You can achieve this in two ways:
**First:**
By running a single command which runs both Nextjs and Flask server
```bash
npm run final
```
Note: Wait till the below message shows up
```bash
[0] ▲ Next.js 14.2.4
[0] - Local: http://localhost:3000
[0] - Environments: .env
[0]
[0] ✓ Starting...
[0] ✓ Ready in 6.8s
[1] * Serving Flask app 'index'
[1] * Debug mode: off
[1] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
[1] * Running on http://127.0.0.1:5000
[1] Press CTRL+C to quit
```
**OR**
**Second:**
By running them each separately
Run the Nextjs development server
```bash
npm run next-dev
```
And finall run Flask server in the /api folder
```bash
cd api
python index.py
```
Now we got both Nextjs and Flask running on port [http://localhost:3000](http://localhost:3000) and [http://127.0.0.1:5000](http://127.0.0.1:5000) respectively.
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
## Images

_Figure 2: Home Page_

_Figure 3: Customer Page_

_Figure 4: Admin Page_