This project uses the ChatOllama model to generate multiple-choice questions from video transcripts. The questions are intended to help understand the content better by focusing on key facts, definitions, and important details mentioned in the transcripts.
Ensure you have the following installed:
- Python 3.6 or later
- Pip (Python package installer)
First, clone the repository and navigate to the project directory:
git clone https://github.com/IvesLiu1026/QGProject.git
cd <repository-directory>Then, install the required Python packages using requirements.txt:
pip install -r requirements.txtThe requirements.txt file should include:
tqdm
langchain-community
langchain-core
ijson
-
Dataset Preparation: Ensure your dataset is in JSON format with the required fields (
title,category,transcript). The file should be located at the path specified in the script. -
Running the Script: Execute the
main.pyscript to generate questions.
python main.pyThis will process the dataset and generate a JSON file with the multiple-choice questions.
main.py: The main script to run the question generation.dataset/: Directory containing the input JSON dataset.generated_questions.json: The output file containing the generated multiple-choice questions.