CS4225/5425 project
.
├── model # ML models (not pretrained)
├── notebooks # Actual notebooks containing the code used to scrape data/perform ML
├── resources # Resource files
├── static # JS code used in flask
├── templates # HTML for frontend
├── requirements.txt # Python packages
└── README.md
/nft_estimator_model.sav
is not the actual model we used because the actual fully trained model is very large- You will need to request for your own OpenSea API key from the OpenSea dev team, as these are not meant to be revealed in public and are controlled items.
/sample
contains sample metadata and images scraped.- (FYI)
/sample/images/testImage.png
is not an existing NFT and/sample/images/mad-hare-society-2-#2676.png
is an NFT existing on Crypto.com/nft, not listed on OpenSea marketplace. These are samples of our unseen dataset we used to test our model. - Recommended: The frontend can be run to observe how our ML model predicts the prices. More details regarding the data collection, processing can be found in our project report.
- Create virtual environment:
yarn run venv
- Activate python virtual environment:
yarn run act
orenv/Scripts/activate
- Install dependencies:
yarn run init
- Install Python
- Set up Python Virtual Environment
yarn run scrape
Alternative: Use the python interpretor to run the scripts. Note that the binaries need to be installed first. This is subject to the availability of the Opensea API key as well, which we are not permitted to expose here.
Here's a quick sample of the schema used in metadata collection:
{
"id": 8955,
"name": "Azuki #8955",
"image": "https://lh3.googleusercontent.com/5yg1ouzzuyrlunlPLwtQ1Spgi1X25PPLGjxKenQo7OCHCdgPNQaRdykn9vpkehA9PpfgYHfhCKWQMM4vBHDNYC8aneebPpdN-vARYw",
"price": 2.99,
"token": "ETH"
}
-
Clone this repository
git clone https://github.com/cs4225-nft-price-estimator/nft-price-estimator
-
(Optional) If you don't have Python, you can follow the guide to install Python 3.9.8 here. Do not use the latest Python 3.10 version as Tensorflow is not supported.
-
Create a python virtual environment
yarn run venv yarn run act yarn run init
Windows (Powershell):
yarn run venv env/Scripts/activate yarn run init
-
Lastly, you can run the application locally using Flask
export FLASK_APP=app export FLASK_ENV=development flask run
Windows:
$env:FLASK_ENV = "development" flask run
-
(Optional) If you want to expose host and trust users on your network, you can make the server publicly available by adding --host=0.0.0.0 to the Flask run command.
flask run --host=0.0.0.0
Then you will be able to access the local server at http://localhost:5000.
-
Go to the hosted local server http://127.0.0.1:5000.