shubham24 commited on
Commit
d1e68ca
·
1 Parent(s): 2f9ee0a

share true

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -25,7 +25,7 @@ def transcribe_and_respond(audio_file):
25
  {"role": "system", "content": "Respond naturally and informatively."},
26
  {"role": "user", "content": "<|audio|>"}
27
  ]
28
- })
29
 
30
  return output
31
 
@@ -34,12 +34,14 @@ def transcribe_and_respond(audio_file):
34
 
35
  # Gradio interface
36
  with gr.Blocks(title="Shuka v1 Transcription") as iface:
37
- gr.Markdown("## 🎙️ Shuka v1 - Voice Transcription")
 
 
38
  with gr.Row():
39
- audio_input = gr.Audio(sources=["microphone", "upload"], type="filepath", label="Audio")
40
- text_output = gr.Textbox(label="Response")
41
 
42
  audio_input.change(fn=transcribe_and_respond, inputs=audio_input, outputs=text_output)
43
 
44
  if __name__ == "__main__":
45
- iface.launch(share=True)
 
25
  {"role": "system", "content": "Respond naturally and informatively."},
26
  {"role": "user", "content": "<|audio|>"}
27
  ]
28
+ }, max_new_tokens=256)
29
 
30
  return output
31
 
 
34
 
35
  # Gradio interface
36
  with gr.Blocks(title="Shuka v1 Transcription") as iface:
37
+ gr.Markdown("## Shuka v1 - Voice Transcription")
38
+ gr.Markdown("Upload or speak, and the model will respond naturally using SarvamAI's voice foundation model.")
39
+
40
  with gr.Row():
41
+ audio_input = gr.Audio(sources=["microphone", "upload"], type="filepath", label="Audio Input")
42
+ text_output = gr.Textbox(label="Model Response", placeholder="Response will appear here...")
43
 
44
  audio_input.change(fn=transcribe_and_respond, inputs=audio_input, outputs=text_output)
45
 
46
  if __name__ == "__main__":
47
+ iface.launch()