| # Windows PowerShell CBT Setup Guide 🇳🇬 |
|
|
| Follow these simple, step-by-step instructions to save, run, and view your local offline CBT prototype on your laptop using Windows PowerShell and Python! |
|
|
| --- |
|
|
| ### Step 1: Open Windows PowerShell |
| 1. On your Windows laptop, press the **Windows Key** on your keyboard. |
| 2. Type `PowerShell` into the search bar. |
| 3. Click on **Windows PowerShell** to open it. |
|
|
| --- |
|
|
| ### Step 2: Install Python (If you don't have it) |
| Check if you already have Python installed by typing the following command in PowerShell and pressing **Enter**: |
| ```powershell |
| python --version |
| ``` |
| *If this command displays a version number (like `Python 3.10.x` or similar), Python is installed. If not, download and install Python from the official website: [https://www.python.org/downloads/](https://www.python.org/downloads/) (Make sure to check the box that says **"Add Python to PATH"** during installation).* |
|
|
| --- |
|
|
| ### Step 3: Install Flask & OpenAI Dependencies |
| To run the server and the AI features, you need to install Flask and the OpenAI Python SDK library. Type the following command in PowerShell and press **Enter**: |
| ```powershell |
| pip install flask openai |
| ``` |
|
|
| --- |
|
|
| ### Step 4: Configure Your NVIDIA NIM API Key |
| To connect Llama 3.3 for generating questions, motivational principal speech evaluations, and explaining wrong answers, configure your NVIDIA NIM API Key by typing this command in PowerShell: |
| ```powershell |
| $env:NVIDIA_API_KEY="your_actual_nvidia_nim_api_key_here" |
| ``` |
| *(Replace `your_actual_nvidia_nim_api_key_here` with your actual NIM credentials key. If you don't have one, the server will continue running and fallback to basic values for offline prototype tests!)* |
|
|
| --- |
|
|
| ### Step 5: Run the CBT Server |
| 1. Navigate to the folder containing `app.py` and `database.py` using the `cd` command. For example, if your files are in a folder named `CBT` on your Desktop: |
| ```powershell |
| cd "$HOME\Desktop\CBT" |
| ``` |
| 2. Start the local server by typing this command and pressing **Enter**: |
| ```powershell |
| python app.py |
| ``` |
| 3. Once started, you should see a message in the terminal that says: |
| `Running on http://127.0.0.1:3000` or `Running on http://localhost:3000`. |
|
|
| --- |
|
|
| ### Step 6: View the Web Screen on Your Laptop Browser |
| 1. Open any web browser on your laptop (Google Chrome, Microsoft Edge, Mozilla Firefox, etc.). |
| 2. In the URL address bar at the top, type: |
| ```text |
| http://127.0.0.1:3000 |
| ``` |
| 3. Press **Enter**. You are now in your beautiful, premium, offline CBT exam portal! You can register profiles, generate real secure IDs (`STU-...` or `TCH-...`), write AI-loaded exams, view your Mrs. Victoria Omotola evaluation speech, and test live explanations instantly. |
|
|