vilt
Build-Deploy-Actions Details

This commit is contained in:
jianjiang 2023-04-26 16:06:46 +08:00
parent 8d7bcc00ad
commit a7c97c9f87
2 changed files with 6 additions and 2 deletions

View File

@ -3,9 +3,12 @@ FROM artifacts.iflytek.com/docker-private/atp/base_image_for_ailab:0.0.1
WORKDIR /app WORKDIR /app
COPY . /app COPY requirements.txt /app
RUN pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple RUN pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
COPY . /app
CMD ["python", "app.py"] CMD ["python", "app.py"]

3
app.py
View File

@ -30,8 +30,9 @@ def vqa(image, question):
demo = gr.Interface(fn=vqa, demo = gr.Interface(fn=vqa,
inputs=['image', 'text'], inputs=['image', 'text'],
outputs='text', outputs='text',
title = "vqa",
theme=theme, theme=theme,
css = "footer {visibility: hidden}",
allow_flagging = "never",
examples = [['soccer.jpg', 'how many people in the picture?']]) examples = [['soccer.jpg', 'how many people in the picture?']])