|
| 1 | +# Setup Guide for Free AI LeetCode Solver - Windows |
| 2 | +This guide will help you set up and use the Free AI LeetCode Solver with ease. Follow the instructions to get everything running smoothly. |
| 3 | + |
| 4 | +## Directory Structure |
| 5 | + |
| 6 | +Make sure your project directory is structured as follows: |
| 7 | + |
| 8 | +``` |
| 9 | +windows/ |
| 10 | + ├── AssistServer/ # Backend engine |
| 11 | + ├── Tesseract/ # OCR magic |
| 12 | + └── free-ai-leetcode-solver.exe # Launcher |
| 13 | +config.py # Configuration file |
| 14 | +``` |
| 15 | + |
| 16 | +## Step 1: Define the Configuration File |
| 17 | + |
| 18 | +Create a `config.py` file in the root of your project directory with the following content: |
| 19 | + |
| 20 | +```python |
| 21 | +{ |
| 22 | + "openai_api_key": "my_openai_api_key", # Replace with your OpenAI API key |
| 23 | + "tesseract_cmd": "C:/Tesseract/tesseract.exe", # Path to the Tesseract executable |
| 24 | + "host": "0.0.0.0", # Host for the FastAPI server |
| 25 | + "port": 10010 # Port for the FastAPI server |
| 26 | +} |
| 27 | +``` |
| 28 | + |
| 29 | +### Notes: |
| 30 | +- Make sure to replace `"my_openai_api_key"` with your actual OpenAI API key. |
| 31 | +- Ensure that the path to `tesseract.exe` is correct based on your Tesseract installation. |
| 32 | + |
| 33 | +## Step 2: Start the Backend Server |
| 34 | + |
| 35 | +To start the backend engine: |
| 36 | + |
| 37 | +1. Navigate to the `AssistServer` directory in your terminal or command prompt. |
| 38 | +2. Execute the following command: |
| 39 | + |
| 40 | + ```bash |
| 41 | + start /b AssistServer.exe config.py |
| 42 | + ``` |
| 43 | + |
| 44 | +This command launches the FastAPI server which will handle the requests from the client. |
| 45 | + |
| 46 | +## Step 3: Start the Client Application |
| 47 | + |
| 48 | +After the server is running, you can launch the client: |
| 49 | + |
| 50 | +1. Run the `free-ai-leetcode-solver.exe` by double-clicking it or using the command prompt. |
| 51 | + |
| 52 | +## Step 4: Usage Instructions |
| 53 | + |
| 54 | +Once both the server and client are running, you can use the application with the following keyboard shortcuts: |
| 55 | + |
| 56 | +- **Ctrl + H**: Capture a screenshot. |
| 57 | +- **Ctrl + Enter**: Send the captured image to the AI for solving. |
| 58 | +- **Ctrl + R**: Reset the current state. |
| 59 | + |
| 60 | +## Troubleshooting |
| 61 | + |
| 62 | +- If the server does not start, ensure the port is not blocked or used by another application. |
| 63 | +- If screenshots do not work, verify that Tesseract is properly installed and the path in the `config.py` is correct. |
| 64 | +- Reach out to support@algorithmspath.com for any questions! |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +By following the above steps, you should be able to set up and use the Free AI LeetCode Solver without issues. Happy coding! |
0 commit comments