From 5f140fccb4aecbfdf720c12f0af21678b647ecc9 Mon Sep 17 00:00:00 2001 From: jianjiang Date: Wed, 26 Apr 2023 16:05:50 +0800 Subject: [PATCH] trocr --- Dockerfile | 6 +++++- app.py | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f900b26..dd5096f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,14 @@ +#FROM python:3.8.13 FROM artifacts.iflytek.com/docker-private/atp/base_image_for_ailab:0.0.1 WORKDIR /app -COPY . /app +COPY requirements.txt /app RUN pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple #RUN pip install -r requirements.txt +COPY . /app + + CMD ["python", "app.py"] diff --git a/app.py b/app.py index 8272a23..89cec9c 100644 --- a/app.py +++ b/app.py @@ -26,8 +26,9 @@ def ocr(image): demo = gr.Interface(fn=ocr, inputs='image', outputs='text', - title = "ocr", theme = theme, + css = "footer {visibility: hidden}", + allow_flagging = "never", examples = ['printed.jpg'])