ok
Build-Deploy-Actions
Details
Build-Deploy-Actions
Details
This commit is contained in:
parent
dbd558b3cd
commit
4fa9bdfe5f
|
@ -6,6 +6,6 @@ WORKDIR /app
|
|||
COPY . /app
|
||||
|
||||
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
|
||||
|
||||
CMD ["python", "app.py"]
|
||||
|
|
2
app.py
2
app.py
|
@ -15,6 +15,8 @@ theme = gr.themes.Default(radius_size=sizes.radius_none).set(
|
|||
)
|
||||
|
||||
model_name = 'google/pegasus-cnn_dailymail'
|
||||
#model_name = '/mnt/atpdata/models_hub/huggingface/summarization/google/pegasus-cnn_dailymail'
|
||||
#model_name = '/models/pegasus-cnn_dailymail'
|
||||
summarization_model = pipeline('summarization', model=model_name, tokenizer=model_name, device=0 if torch.cuda.is_available() else -1)
|
||||
|
||||
def generate_abstractive_summary(text, type, min_len=120, max_len=512, **kwargs):
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
protobuf==3.20.1
|
Loading…
Reference in New Issue