Skip to content

Commit

Permalink
folder structured
Browse files Browse the repository at this point in the history
  • Loading branch information
tedoaba committed Oct 22, 2024
1 parent 767740f commit 1aa25fa
Show file tree
Hide file tree
Showing 31 changed files with 102 additions and 117 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/

# Environment
.week89
.env

# Data
data/
Expand Down
96 changes: 96 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,98 @@
# KAIM-W8-9
KAIM Weak 8 and 9 Challenge

## **Steps to follow**

* Clone the repository

```python

git clone https://github.com/tedoaba/KAIM-W8-9.git
cd KAIM-W8-9

```

* Create a virtual environment

```python

python -m venv .venv

```

* Create .env file and add the following

```python

ENVIRONMENT="Development"
FLASK_SECRET_KEY='your secret key'

DATABASE_URL=postgresql://database:password@host:port/db_name

```

* Install all the requirements

```python

# install dependencies
pip install -r requirements.txt

```

* Install tailwindcss in the `app` directory

```python

# go to fraud directory
cd app

# Tailwind CSS
npm install tailwindcss

```

* Create `tailwind.config.js` file

```python
# create tailwind.config.js file
npx tailwindcss init

```

* Copy and add the following to `package.json` file so that your css will be updated every time you make a change

```python

"scripts": {
"create-css": "npx tailwindcss -i ./static/src/input.css -o ./static/css/main.css --watch"
}

```

* Initialize tailwindcss

```python

# Run the following every time you update tailwind css
npm run create-css

```

* In a separate terminal, in the parent directory, initialize the database

```python

# Initialize database
python -m flask --app app init-db

```

* Run Flask App

```python

# Run flask
python -m flask --app app run --port 8000 --debug

```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion flask-app/.gitignore

This file was deleted.

102 changes: 0 additions & 102 deletions flask-app/README.md

This file was deleted.

Binary file removed flask-app/model.pkl
Binary file not shown.
13 changes: 0 additions & 13 deletions flask-app/requirements.txt

This file was deleted.

File renamed without changes.
6 changes: 5 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ imblearn
tensorflow
shap
lime
mlflow
mlflow
flask
click
flask_sqlalchemy
Flask-Migrate

0 comments on commit 1aa25fa

Please sign in to comment.