A "Ticket Checker" with Deep Learning-based intelligent support system integrated with RAG and Re-Ranking Algorithm.
- Set Train.train_model to true, only if you want to train the model again. I have already provided the train torch model.
- Similarly, set Train.train_tokenizer to true, only if you want to train the tokenizer again. I have already provided the train tokenizer.
- If you set the Process.Stream to True, then it will start processing tickets one by one from ticket_test: "data/data_stream_test.json" , which is 10% of the original dataset provided. This mimics 500 daily input tickets, coming to our Server. Running this takes a lot of time.
- Setting it Process.Stream to False only process songle ticket, that you define in input_query_path: "data/input_query.json".
Instructions on running the code:
-
Create a virtual environment using Python's builtin venv:
$ python -m venv .venv # Linux / WSL2 / macOS $ source .venv/bin/activate # Windows $ .venv\Scripts\activate
-
Install poetry.
-
Install runtime and development dependencies:
poetry install --no-root
You can run the application using Python or Docker. My recommended apporach is to run using Python via cmd. There are some problems with running the complete program inside a docker container.
To run the application using Python. Currently, it only support extrating relevant ticket for a single ticket, provided in the data/input_query.json file. Execute the following command:
python main.pyTo run mlflow on the side:
mlflow ui --backend-store-uri "file:///PATH/TO/YOUR/MLFLOWRUNS/" # The path will be displayed when train is executed.
And then simply open http://127.0.0.1:5000
docker compose builddocker compose updocker compose downdocker compose down --volumes