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 |
|
|
@@ -42,15 +42,17 @@ def transcribe_and_respond(audio_file):
|
|
| 42 |
|
| 43 |
iface = gr.Interface(
|
| 44 |
fn=transcribe_and_respond,
|
| 45 |
-
|
| 46 |
-
|
|
|
|
| 47 |
outputs=[
|
| 48 |
-
|
| 49 |
-
|
|
|
|
| 50 |
title="ShukaNotesApp",
|
| 51 |
-
description="
|
| 52 |
live=True
|
| 53 |
)
|
| 54 |
|
| 55 |
if __name__ == "__main__":
|
| 56 |
-
iface.launch()
|
|
|
|
| 22 |
print(f"Audio dtype: {audio.dtype}, Audio shape: {audio.shape}, Sample rate: {sr}")
|
| 23 |
|
| 24 |
turns = [
|
| 25 |
+
{'role': 'system', 'content': 'Compile the information'},
|
| 26 |
{'role': 'user', 'content': '<|audio|>'}
|
| 27 |
]
|
| 28 |
|
|
|
|
| 42 |
|
| 43 |
iface = gr.Interface(
|
| 44 |
fn=transcribe_and_respond,
|
| 45 |
+
inputs=[
|
| 46 |
+
gr.Audio(sources=["upload", "microphone"], type="filepath"),
|
| 47 |
+
],
|
| 48 |
outputs=[
|
| 49 |
+
gr.Textbox(label="Transcript"),
|
| 50 |
+
gr.File(label="Download Transcript")
|
| 51 |
+
],
|
| 52 |
title="ShukaNotesApp",
|
| 53 |
+
description="Note Maker for Indian Offices and Their Dozen Languages.",
|
| 54 |
live=True
|
| 55 |
)
|
| 56 |
|
| 57 |
if __name__ == "__main__":
|
| 58 |
+
iface.launch()
|