Spaces:
Running
on
Zero
Running
on
Zero
Meetnote-Support
commited on
run
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def transcribe_and_respond(audio_file):
|
|
22 |
print(f"Audio dtype: {audio.dtype}, Audio shape: {audio.shape}, Sample rate: {sr}")
|
23 |
|
24 |
turns = [
|
25 |
-
{'role': 'system', 'content': '
|
26 |
{'role': 'user', 'content': '<|audio|>'}
|
27 |
]
|
28 |
|
@@ -30,7 +30,7 @@ def transcribe_and_respond(audio_file):
|
|
30 |
print(f"Initial turns: {turns}")
|
31 |
|
32 |
# Call the model with the audio and prompt
|
33 |
-
output = pipe({'audio': audio, 'turns': turns, 'sampling_rate': sr}, max_new_tokens=
|
34 |
|
35 |
# Debug: Print the final output from the model
|
36 |
print(f"Model output: {output}")
|
|
|
22 |
print(f"Audio dtype: {audio.dtype}, Audio shape: {audio.shape}, Sample rate: {sr}")
|
23 |
|
24 |
turns = [
|
25 |
+
{'role': 'system', 'content': 'You are a transcription agent. What ever the speaker has spoken should be outputted as text. Nothing less, nothing more.'},
|
26 |
{'role': 'user', 'content': '<|audio|>'}
|
27 |
]
|
28 |
|
|
|
30 |
print(f"Initial turns: {turns}")
|
31 |
|
32 |
# Call the model with the audio and prompt
|
33 |
+
output = pipe({'audio': audio, 'turns': turns, 'sampling_rate': sr}, max_new_tokens=1024)
|
34 |
|
35 |
# Debug: Print the final output from the model
|
36 |
print(f"Model output: {output}")
|