helvekami commited on
Commit
289e5e4
·
verified ·
1 Parent(s): b5f86ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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': 'repeat the previous text exactly with no changes'},
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=512)
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="Live Transcription and Response",
48
- description="Speak into your microphone, and the model will respond naturally and informatively.",
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