/irwa-search-engine
├── myapp # Contains the main application logic
├── templates # Contains HTML templates for the Flask application
├── static # Contains static assets (images, CSS, JavaScript)
├── data # Contains the dataset file (fashion_products_dataset.json)
├── project_progress # Contains your solutions for Parts 1, 2, and 3 of the project
├── .env # Environment variables for configuration (e.g., API keys)
├── .gitignore # Specifies files and directories to be ignored by Git
├── LICENSE # License information for the project
├── requirements.txt # Lists Python package dependencies
├── web_app.py # Main Flask application
└── README.md # Project documentation and usage instructions
Open a terminal console and execute:
cd <your preferred projects root directory>
git clone https://github.com/trokhymovych/irwa-search-engine.git
Setting up a virtualenv is recommended to isolate the project dependencies from other Python projects on your machine. It allows you to manage packages on a per-project basis, avoiding potential conflicts between different projects.
In the project root directory execute:
pip3 install virtualenv
virtualenv --versionIn the root of the project folder run to create a virtualenv named irwa_venv:
virtualenv irwa_venvIf you list the contents of the project root directory, you will see that it has created a new folder named irwa_venv that contains the virtualenv:
ls -lThe next step is to activate your new virtualenv for the project:
source irwa_venv/bin/activateor for Windows...
irwa_venv\Scripts\activate.batThis will load the python virtualenv for the project.
Make sure you are in the root of the project folder and that your virtualenv is activated (you should see (irwa_venv) in your terminal prompt).
And then install all the packages listed in requirements.txt with:
pip install -r requirements.txtIf you need to add more packages in the future, you can install them with pip and then update requirements.txt with:
pip freeze > requirements.txtEnjoy!
python -V
# Make sure we use Python 3
cd search-engine-web-app
python web_app.pyThe above will start a web server with the application:
* Serving Flask app 'web-app' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:8088/ (Press CTRL+C to quit)
Open Web app in your Browser:
http://127.0.0.1:8088/ or http://localhost:8088/
After creating the project and code in local computer...
- Login to GitHub and create a new repo.
- Go to the root page of your new repo and note the url from the browser.
- Execute the following locally:
cd <project root folder>
git init -b main
git add . && git commit -m "initial commit"
git remote add origin <your GitHub repo URL from the browser>
git push -u origin main- Put the data file
fashion_products_dataset.jsonin thedatafolder. It will be provided to you by the instructor. - As for Parts 1, 2, and 3 of the project, please use the
project_progressfolder to store your solutions. Each part should contain.pdffile with your report and.ipynb(Jupyter Notebook) file with your code for solution andREADME.mdwith explanation of the content and instructions for results reproduction. - For the Part 4, of the project, you should build a web application using Flask that allows users to search through a collection of documents and view analytics about their searches. You should work mailnly in the
web_app.pyfilemyappandtemplatesfolders. Feel free to change any code or add new files as needed. The provided code is just a starting point to help you get started quickly. - Make sure to update the
.envfile with your Groq API key (can be found here, the free version is more than enough for our purposes) and any other necessary configurations. IMPORTANT: Do not share your.envfile publicly as it contains sensitive information. It is included in.gitignoreto prevent accidental commits. (It should never be included in the repos and appear here only for demonstration purposes). - Have fun and be creative!
The project is adapted from the following sources:
