better model
This commit is contained in:
parent
7a0e2b1411
commit
eac217cc09
5 changed files with 19 additions and 15 deletions
|
@ -1,13 +1,11 @@
|
||||||
bin
|
__pycache__/
|
||||||
|
bin/
|
||||||
|
lib/
|
||||||
build
|
build
|
||||||
Dockerfile-alpine
|
run
|
||||||
lib
|
*/__pycache__/
|
||||||
__pycache__
|
*/*/__pycache__/
|
||||||
*/__pycache__
|
*/*/*/__pycache__/
|
||||||
*/*/__pycache__
|
|
||||||
*/*/*/__pycache__
|
|
||||||
pyvenv.cfg
|
pyvenv.cfg
|
||||||
readme.md
|
readme.md
|
||||||
run
|
chatbots_*
|
||||||
test
|
|
||||||
chatbots_api.tar.gz
|
|
||||||
|
|
|
@ -3,6 +3,6 @@ FROM python:3.10-slim
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt requirements.txt
|
COPY requirements.txt requirements.txt
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
COPY . .
|
COPY . .
|
||||||
CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||||
|
|
10
api/build
10
api/build
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
docker build --tag chatbots_api .
|
FILE_PATH="../chatbots_api_$(uname -m).tar.gz"
|
||||||
docker save chatbots_api | pigz > chatbots_api_$(uname -m).tar.gz
|
|
||||||
|
if [ -f $FILE_PATH ]; then
|
||||||
|
rm $FILE_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build --tag chatbots_api .
|
||||||
|
docker save chatbots_api | pigz > $FILE_PATH
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fastapi
|
fastapi
|
||||||
uvicorn
|
uvicorn
|
||||||
transformers
|
transformers
|
||||||
--extra-index-url https://download.pytorch.org/whl/cpu/torch
|
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
torch
|
torch
|
||||||
|
|
|
@ -7,7 +7,7 @@ tokenizer = AutoTokenizer.from_pretrained(
|
||||||
"microsoft/DialoGPT-large", padding_side='left'
|
"microsoft/DialoGPT-large", padding_side='left'
|
||||||
)
|
)
|
||||||
model = AutoModelForCausalLM.from_pretrained(
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
"src/bots/cartman"
|
"src/bots/cartman_med_3ep"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue