diff --git a/hosting/Dockerfile b/hosting/Dockerfile index c45d5ae..7bbbd6a 100644 --- a/hosting/Dockerfile +++ b/hosting/Dockerfile @@ -16,7 +16,7 @@ WORKDIR /app # Copy necessary files to the container COPY requirements.txt . COPY main.py . -COPY download_models.py . +COPY ../models ./models # Create a virtual environment in the container RUN python3 -m venv .venv @@ -25,7 +25,4 @@ RUN python3 -m venv .venv ENV PATH="/app/.venv/bin:$PATH" # Install Python dependencies from the requirements file -RUN pip install --no-cache-dir -r requirements.txt && \ - # Get the models from Hugging Face to bake into the container - python3 download_models.py - +RUN pip install --no-cache-dir -r requirements.txt diff --git a/hosting/base.py b/hosting/base.py new file mode 100644 index 0000000..480bff3 --- /dev/null +++ b/hosting/base.py @@ -0,0 +1,18 @@ + + +from abc import ABC, abstractmethod + +class BaseModel(ABC): + + """A model class to lead the model and tokenizer""" + + def __init__(self) -> None: + pass + + @abstractmethod + def load_model(): + pass + + @abstractmethod + def load_tokenizer(): + pass \ No newline at end of file diff --git a/hosting/main.py b/hosting/main.py new file mode 100644 index 0000000..e69de29