From f57b68121a526baea43b2e93f4540d8a2995f633 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 29 四月 2024 15:15:24 +0800
Subject: [PATCH] batch
---
examples/industrial_data_pretraining/qwen_audio/demo_chat.py | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/examples/industrial_data_pretraining/qwen_audio/demo_chat.py b/examples/industrial_data_pretraining/qwen_audio/demo_chat.py
index e8c6cf4..6a69fa1 100644
--- a/examples/industrial_data_pretraining/qwen_audio/demo_chat.py
+++ b/examples/industrial_data_pretraining/qwen_audio/demo_chat.py
@@ -7,20 +7,18 @@
from funasr import AutoModel
-model = AutoModel(model="Qwen-Audio-Chat",
- model_path=None,
- )
+model = AutoModel(model="Qwen-Audio-Chat")
audio_in = "https://github.com/QwenLM/Qwen-Audio/raw/main/assets/audio/1272-128104-0000.flac"
# 1st dialogue turn
-prompt = 'what does the person say?'
+prompt = "what does the person say?"
cache = {"history": None}
res = model.generate(input=audio_in, prompt=prompt, cache=cache)
print(res)
-prompt = 'Find the start time and end time of the word "middle classes"'
+
# 2nd dialogue turn
+prompt = 'Find the start time and end time of the word "middle classes"'
res = model.generate(input=None, prompt=prompt, cache=cache)
print(res)
-
--
Gitblit v1.9.1