*[2. Data Preprocessing](#2-data-preprocessing-folder)
*[3. ML Model Development](#3-ml-model-development-folder)
*[4. Service Files](#4-Service-Files-folder)
*[5. Fast API & app file](#5-Fast-API-&-app-file-folder)
------------------
[Executing Function 1 on Google Colab](#executing-function-1-on-google-colab)
## FastAPI Development
-------------
## Function 1 Development
### 1. Dataset Creation ()
- Within this folder, you'll discover two Python scripts developed for dataset generation:
- To run the API, please ensure you have installed the required packages, "fastapi" and "uvicorn." If you haven't already installed them, you can do so using the following commands:
-`dataset_gen.py`: This script generates synthetic data for two games, "Clock Challenge" and "Number Sequence," and stores the data in a CSV file.
```bash
-`dataset_gen_add_improvement.py`: This script calculates an improvement score for each row in the dataset, and the final dataset incorporates this score, quantifying the child's progress on a scale of 1 to 10 based on their interactions with the game.
pip install fastapi
pip install"uvicorn[standard]"
```
-Once these packages are installed, you can proceed to run the API.
-You can also access the saved CSV files in this folder.
1. To run the api, use the following command inside the API folder:
### 2. Data Preprocessing ()
```bash
- Inside this folder, you'll come across two Jupyter Notebooks dedicated to data preprocessing:
python main.py
```
2. You can access the project output in your browser using the following URL:
-`dataset_analysis.ipynb`: This file primarily involves loading the dataset created in the dataset creation step, removing the timestamp, and saving the resulting dataset as 'final_game_dataset.csv'. It also includes some dataset analysis.
```bash
-`dataset_preprocess.ipynb`: In this notebook, the 'final_game_dataset' is loaded, and standard scaling is applied. The resulting scalers are saved as 'scaler_X.pkl' and 'scaler_y.pkl,' respectively.
http://127.0.0.1:8000
```
- Additionally, you can locate the 'final_game_dataset.csv' in this folder.
3. To explore the API documentation, visit:
### 3. ML Model Development ()
- Within this directory, there are two crucial files:
-`ml_model_dev.ipynb`: This file is responsible for developing the model for function 2.
-`final_model_deploy.ipynb`: In this file, you will discover the deployment code to test the saved model with user inputs:
``` python
# Example usage:
success_count=8
attempt_count=10
game_score_xp=73
game_level=9
engagement_time_mins=5
```bash
http://127.0.0.1:8000/docs
```
```
------------------------
- The saved model exceeds the size limit for GitHub uploads, so you'll need to download it from [Google Drive]() and place it inside the 'MLModelDev/fun1' folder as follows:
---------------------
## Setting Up the Development Environment
### 4. Service Files ()
- Within this directory, there are one python ".py" files:
Follow these steps to set up your development environment for this project:
-`self_improvement.py`: This service file include the total process of function 01.
- Process :firstly get the player dataset and caluculate the real time improvement ,compaired the previouse improvement score and get the future time(One week or two week) improvment prediction
- Within this app.py module include one Fast API end points for function 1 :
- 1. Request body : Connect the real time played database and use the player_name to compil this function(player_name :rQIRSQe3ZYTRDGfvRb8dvzaCKkA2)
- Special Note:We need to create that database as mentioned in below link player_game_dataset.csv ([Link](https://drive.google.com/drive/folders/1mRzLkdMJLO-5pc4vBxvdmv1B2WD5i2Lg?usp=drive_link))