Update app.py
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}")
|
|
@@ -44,8 +44,8 @@ iface = gr.Interface(
|
|
| 44 |
fn=transcribe_and_respond,
|
| 45 |
inputs=gr.Audio(sources="microphone", type="filepath"),
|
| 46 |
outputs="text",
|
| 47 |
-
title="
|
| 48 |
-
description="
|
| 49 |
live=True
|
| 50 |
)
|
| 51 |
|
|
|
|
| 22 |
print(f"Audio dtype: {audio.dtype}, Audio shape: {audio.shape}, Sample rate: {sr}")
|
| 23 |
|
| 24 |
turns = [
|
| 25 |
+
{'role': 'system', 'content': 'Share the Key Take Aways and Action Steps'},
|
| 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=10000)
|
| 34 |
|
| 35 |
# Debug: Print the final output from the model
|
| 36 |
print(f"Model output: {output}")
|
|
|
|
| 44 |
fn=transcribe_and_respond,
|
| 45 |
inputs=gr.Audio(sources="microphone", type="filepath"),
|
| 46 |
outputs="text",
|
| 47 |
+
title="ShukaNotesApp",
|
| 48 |
+
description="Enter your Audio from meetings here and the model will share the key take aways.",
|
| 49 |
live=True
|
| 50 |
)
|
| 51 |
|