Staticaliza commited on
Commit
bbaf0ab
·
verified ·
1 Parent(s): 409f566

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -104,7 +104,7 @@ def generate(input, instruction=DEFAULT_INPUT, sampling=False, temperature=0.7,
104
  sys_msg = repo.get_sys_prompt(mode="omni", language="en")
105
  msgs = [sys_msg, {"role": "user", "content": omni_content}]
106
  params = dict(msgs=msgs, tokenizer=tokenizer, omni_input=True, **kw)
107
- return repo.chat(**params
108
  elif filetype == "Audio":
109
  audio_np, sample_rate = librosa.load(input, sr=16000, mono=True)
110
  chunk_tensor = torch.from_numpy(audio_np).float().to(DEVICE)
 
104
  sys_msg = repo.get_sys_prompt(mode="omni", language="en")
105
  msgs = [sys_msg, {"role": "user", "content": omni_content}]
106
  params = dict(msgs=msgs, tokenizer=tokenizer, omni_input=True, **kw)
107
+ return repo.chat(**params)
108
  elif filetype == "Audio":
109
  audio_np, sample_rate = librosa.load(input, sr=16000, mono=True)
110
  chunk_tensor = torch.from_numpy(audio_np).float().to(DEVICE)