This is a FastAPI-based API that provides topic modeling and sentence embedding functionalities using BERT models. The API supports NER dataset like few_nerd
. You can find the frontend for this project here.
https://github.com/bruehldev/Code-Graph-Backend/assets/15344369/faf1d89a-28cc-4416-a649-0567688ec25a
nvidia-smi
sudo apt update
sudo apt install build-essential
which psql
sudo -u postgres psql
Create a new user (replace password):
CREATE USER admin WITH PASSWORD 'password';
Create Database:
CREATE DATABASE codegraph OWNER admin;
Grant Privileges:
GRANT ALL PRIVILEGES ON DATABASE codegraph TO admin;
Exit Prompt:
\q
Install the required packages by running the following command:
conda env create --name CodeGraph --file environment.yml
conda activate CodeGraph
Start the server using the following command:
cd src
uvicorn main:app --reload
Once the server is running, you can access the API at http://localhost:8000
.
API Endpoints: To access the API documentation use:
Datasets used by us can be found in the datasets folder:
Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please submit a pull request.
This project is licensed under the Apache License, Version 2.0.
The project follows the following folder structure:
project/
├─ src/
│ ├─ main.py
│ ├─ module
│ │ └─ routes.py
│ │ └─ service.py
│ │ └─ schema.py
│ ├─ ...
├─ exported/
├─ .gitignore
├─ environment.yml
├─ ...
exported/
: .Used to store generated data.gitignore
: Specifies files and folders to exclude from version control.main.py
: The main entry point of the application.