SalesSage is a product developed for TikTok TechJam 2024, integrating frontend (React) and backend (Flask) technologies. The application leverages pre-trained models such as snips-nlu and whisperX for tasks including sentimental analysis, ToDo list recommendations, and Automatic Speech Recognition (ASR). Furthermore, we implemented this on lark web application to host our web application on lark messanger.
- ngrok
- python 3.7.1
- python 3.9
- cuda 11.8
- HuggingFace
Clone this repo before setting up
git clone https://github.com/Darkenles/SalesSage.gitNote: Remember to replace your HF Secret Key in 'run_whisperX.py' and 'test_whisperX.py' at the line where 'diarize_model' is being called, and subscribe to the repository provided in WhisperX for HF (WhisperX GitHub Repo).
Ensure Python is linked to Python version 3.9 before running the command below:
cd Backend
python -m venv venvone
venvone\Scripts\activateReplace venvone with the name that your virtual environment to be called
Within your git clone repo, run the following commands
mkdir uploads
mkdir model_data
pip install torch==2.0.0+cu118 torchaudio==2.0.0+cu118 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt
git clone https://github.com/m-bain/whisperX.git
cd whisperX
pip install -e .
cd ..After accessing your virtual environment, cd into your repo clone
python server.pycd snips-nlu
conda create --name myenv python=3.7.1
conda activate myenvReplace myenv with the desired name for your environment.
Navigate to the snips-nlu folder. This is where the second flask app will be executed. Following which run the two commands below to set up the virtual environment.
pip install -r requirements.txt
conda install --yes --file conda_requirements.txt
python -m snips_nlu download enpython App.pyThe version of React being used in this project is 18.0.0
- Run
npm install
cd Frontend
npm install
- Run
npm startto start the app in the development mode.
npm start
The web application browser should run on your http://localhost:3000
- Create a new web app in the Lark Developer Console
- Setup your ngrok and follow the instructions here ngrok guide
- Run the frontend and backend scripts
- Setup your web application to a link using ngrok by running the follow command
ngrok http 3000- With the link which is highlighted by the boarder as seen from this figure
After getting the link, modify the web app configuration in ur lark developer for desktop homepage to the link.
- After releasing the version on lark, This web application will be able to access by user through the lark messanger.
The frontend of our web application will display the results in the following format 
Our users could easily read and understand the meaning of the various output.