Before getting started, you must have the following on your machine.
- Frontend:
- Node.js (https://nodejs.org/en)
- Ionic CLI (https://ionicframework.com/docs/intro/cli)
- Capacitor CLI (https://capacitorjs.com/docs/getting-started)
- Android Studio (including Android SDK installation)
- Backend:
- Python 3.8
- Python modules declared on requirements.txt (pip install -r requirements.txt)
- Java (some Python modules require JDK)
- gcloud CLI (requires setting up application credentials)
The frontend project includes two principal parts:
- Web-level project (Ionic UI-toolkit-based web application) [Root directory:
/2t_frontend] - Native-level project (Android Studio Project) [Root directory:
/2t_frontend/android]
To deploy an Android application, you must first build the web-level project through Capacitor, then use Android Studio to build the native-level application (APK).
-
Please confirm the following before setting up the project.
- Node.js
- Ionic CLI
- Capacitor CLI
- Android Studio
- Android SDK
-
Run the following commands to set up the web-level project.
npm install
-
Set up the web-level project’s environment variable (
/2t_frontend/.env) based on the template file (/2t_frontend/.env.template). -
Run the following commands to build the web-level project and sync with the native-level project.
npm run build npx cap sync
-
Open the Android Studio project using the following command. (Alternatively, you can open
/2t_frontend/androidon Android Studio)npx cap open android
-
Use Android Studio tools to run the frontend project as an Android application.
- Documentation: https://developer.android.com/studio/run
-
Please confirm the following before setting up the project.
- Python 3.8 (Note: As KoBERT uses the legacy versions of some modules, running the backend application on the environment beyond Python 3.8 may not work.)
- Java (some Python modules require JDK)
sudo apt install openjdk-11-jdk - gcloud CLI (requires setting up application credentials)
-
Run the following commands to set up the project.
cd 2t_backend pip install -r requirements.txt
-
Set up application credentials using gcloud CLI.
- Documentation: https://cloud.google.com/docs/authentication/gcloud
-
Proceed with the following to set up the voice phishing detection features.
-
KoBERT: Locate the trained model file (teletect_kobert_train.pt) to the following directory:
/2t_backend/teletect/detection/kobert_detection/KoBERTModel/model. You can acquire the model file through the following methods:- Method 1: Run
train_kobert_detection.pyon the local machine. - Method 2: Download our pre-trained model file from the following URL and locate it in the model directory. https://link.geonhui.com/gdsc/sc2024/detection-model-file
- Method 1: Run
-
Vertex AI/Gemini: No further actions are necessary if the application credentials setup is complete.
-
-
Set up the environment variable (
.env) based on the template file (.env.template).- The environment variable file should be located in
/2t_backend/.env
- The environment variable file should be located in
-
Run the backend server using the following command.
uvicorn main:app --reload
- Voice phishing detection works faster on a GPU server that supports CUDA.
- To force the backend to run the detection on CPU mode, set the environment variable
DETECTION_FORCE_CPUtotrue.