From 6ffe11dbc74247d14235e8fa55cd392b2e696c2a Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 6 Dec 2024 14:57:00 +0800 Subject: [PATCH] bugfix --- requirements.txt | 4 ++++ wwwroot/api/index.dspy | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8644c6a..1b6b397 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,8 @@ git+https://git.kaiyuancloud.cn/yumoqing/apppublic git+https://git.kaiyuancloud.cn/yumoqing/ahserver +git+https://github.com/huggingface/transformers@21fac7abba2a37fae86106f87fcf9974fd1e3830 +accelerate +torch +torchaudio optimum auto_gptq diff --git a/wwwroot/api/index.dspy b/wwwroot/api/index.dspy index ee0bd6d..9812d56 100644 --- a/wwwroot/api/index.dspy +++ b/wwwroot/api/index.dspy @@ -1,3 +1,9 @@ info(f'{params_kw=}') -return await inference(params_kw.prompt, params_kw.image, params_kw.video) - +t1 = time.time() +ret = await inference(params_kw.prompt, params_kw.image, params_kw.video) +t2 = time.time() +info(f'{ret=}') +return { + "content":ret + "time_cost":t2 - t1 +}