diff --git a/table_transformer_detection/Dockerfile b/table_transformer_detection/Dockerfile new file mode 100644 index 0000000..d525920 --- /dev/null +++ b/table_transformer_detection/Dockerfile @@ -0,0 +1,25 @@ +# please visit https://github.com/xfyun/aiges/releases to get stable and suitable iamges. + +FROM docker.io/library/python:3.8.9 + + +RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list +RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list + + +WORKDIR /home/user/app +RUN useradd -m -u 1000 user +RUN chown -R 1000.1000 /home/user + + +RUN pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/ + + +RUN pip install --no-cache-dir pip==22.3.1 +RUN --mount=target=requirements.txt,source=requirements.txt pip install --no-cache-dir -r requirements.txt + + +COPY --chown=1000 ./ /home/user/app + + +CMD ["python3", "app.py"] \ No newline at end of file diff --git a/table_transformer_detection/app.py b/table_transformer_detection/app.py index 7e346bc..410ead1 100644 --- a/table_transformer_detection/app.py +++ b/table_transformer_detection/app.py @@ -47,14 +47,4 @@ with gr.Blocks() as demo: image_button.click(inference, inputs=image_input, outputs=image_output) gr.Examples(examples,inputs=image_input) -# demo = gr.Interface( -# fn=inference, -# inputs=[gr.inputs.Image(type="pil")], -# outputs=gr.outputs.Textbox(), -# title=title, -# description=description, -# article=article, -# examples=examples) - - demo.launch() \ No newline at end of file diff --git a/table_transformer_detection/requirements.txt b/table_transformer_detection/requirements.txt new file mode 100644 index 0000000..973b15c --- /dev/null +++ b/table_transformer_detection/requirements.txt @@ -0,0 +1,2 @@ +gradio==3.21.0 +transformers==4.27.1