-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
model for deep learning and tailwind css modified
- Loading branch information
Showing
23 changed files
with
479 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ mlruns | |
mlartifacts/ | ||
mlruns/ | ||
|
||
node_modules/ | ||
|
||
|
||
# Distribution / packaging | ||
.Python | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,24 @@ | ||
# Use official Python image as the base image | ||
# Use the official Python image as a base image | ||
FROM python:3.10 | ||
|
||
# Set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV FLASK_APP=app | ||
|
||
# Copy and install system dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
libpq-dev \ | ||
curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Node.js and npm for TailwindCSS | ||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ | ||
apt-get install -y nodejs && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the working directory | ||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy project dependencies first to improve caching | ||
# Copy the requirements file into the container | ||
COPY requirements.txt . | ||
|
||
RUN pip install --no-cache-dir --upgrade pip && \ | ||
pip install --no-cache-dir -r requirements.txt | ||
# Copy Node dependencies and install them | ||
COPY app/package.json . | ||
RUN npm install | ||
# Install the dependencies | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy the rest of the project files | ||
COPY app/. . | ||
# Copy the entire application into the container | ||
COPY . . | ||
|
||
# Build CSS with Tailwind | ||
RUN npm run create-css | ||
# Set environment variables | ||
ENV FLASK_APP=app | ||
ENV FLASK_ENV=development | ||
|
||
# Expose port 5000 for the Flask app | ||
# Expose the port the app runs on | ||
EXPOSE 5000 | ||
|
||
# Run the Flask app | ||
# Command to run the application | ||
CMD ["flask", "run", "--host=0.0.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
DROP TABLE IF EXISTS transactions; | ||
|
||
CREATE TABLE transactions ( | ||
user_id INT PRIMARY KEY, -- user_id as the unique identifier | ||
signup_time TIMESTAMP NOT NULL, -- Signup time as timestamp | ||
purchase_time TIMESTAMP NOT NULL, -- Purchase time as timestamp | ||
purchase_value FLOAT NOT NULL, -- Purchase value as a float | ||
device_id VARCHAR NOT NULL, -- Device ID as a string | ||
source VARCHAR NOT NULL, -- Source as a string (e.g., app, web) | ||
browser VARCHAR NOT NULL, -- Browser as a string | ||
sex VARCHAR NOT NULL, -- Sex as a string | ||
age INT NOT NULL, -- Age as integer | ||
ip_address FLOAT NOT NULL, -- IP address as a float | ||
lower_bound_ip_address FLOAT NOT NULL, -- Lower bound of IP address | ||
upper_bound_ip_address FLOAT NOT NULL, -- Upper bound of IP address | ||
country VARCHAR NOT NULL -- Country as a string | ||
user_id INT PRIMARY KEY, | ||
signup_time TIMESTAMP NOT NULL, | ||
purchase_time TIMESTAMP NOT NULL, | ||
purchase_value FLOAT NOT NULL, | ||
device_id VARCHAR NOT NULL, | ||
source VARCHAR NOT NULL, | ||
browser VARCHAR NOT NULL, | ||
sex VARCHAR NOT NULL, | ||
age INT NOT NULL, | ||
ip_address FLOAT NOT NULL, | ||
lower_bound_ip_address FLOAT NOT NULL, | ||
upper_bound_ip_address FLOAT NOT NULL, | ||
country VARCHAR NOT NULL | ||
|
||
DROP TABLE IF EXISTS features; | ||
|
||
CREATE TABLE features ( | ||
user_id SERIAL PRIMARY KEY, | ||
signup_time TIMESTAMP, | ||
purchase_time TIMESTAMP, | ||
purchase_value FLOAT, | ||
device_id VARCHAR, | ||
source VARCHAR, | ||
browser VARCHAR, | ||
sex VARCHAR, | ||
age INTEGER, | ||
ip_address VARCHAR, | ||
class INTEGER, | ||
lower_bound_ip_address BIGINT, | ||
upper_bound_ip_address BIGINT, | ||
country VARCHAR | ||
); |
Oops, something went wrong.