From e24dbdc496debec225414d4d2c760f5775e64f2a Mon Sep 17 00:00:00 2001
From: 天地 <tiandiweizun@gmail.com>
Date: 星期三, 26 三月 2025 13:44:41 +0800
Subject: [PATCH] 感觉应该从文件读取更合适,因为上面判断了文件存在,且可以读取,如果本身是文本的话,下面也会有逻辑进行处理 (#2452)
---
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 4fb5e5b..26b5b89 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/Qwen-Audio-Chat",
- model_path=None,
- )
+model = AutoModel(model="Qwen/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