MRuslanR commited on
Commit
14183ba
·
1 Parent(s): 9c917b9

Changed base prompt for Qwen

Browse files
utils/speech_recognition.py CHANGED
@@ -6,8 +6,6 @@ def transcribe_audio(audio_path):
6
  device = "cpu"
7
  if torch.cuda.is_available():
8
  device = "cuda"
9
- if torch.mps.is_available():
10
- device = "mps"
11
 
12
  pipe = pipeline(
13
  "automatic-speech-recognition",
 
6
  device = "cpu"
7
  if torch.cuda.is_available():
8
  device = "cuda"
 
 
9
 
10
  pipe = pipeline(
11
  "automatic-speech-recognition",
utils/text_processing.py CHANGED
@@ -16,7 +16,7 @@ def generate_response(model, tokenizer, question, context):
16
  prompt = f"Контекст: {context}\n\nВопрос: {question}\nОтвет:"
17
 
18
  messages = [
19
- {"role": "system", "content": "Вы - полезный помощник, которому далее будет дан Контекст (текст, распознанный на видео) и Вопрос (который пользователь задал по этому тексту). Ваша задача - четко и грамотно ответить на вопрос пользователя."},
20
  {"role": "user", "content": prompt}
21
  ]
22
 
 
16
  prompt = f"Контекст: {context}\n\nВопрос: {question}\nОтвет:"
17
 
18
  messages = [
19
+ {"role": "system", "content": "Вы - полезный помощник."},
20
  {"role": "user", "content": prompt}
21
  ]
22