Spaces:
Sleeping
Sleeping
markdown changes
Browse files
app.py
CHANGED
|
@@ -48,11 +48,20 @@ def process_audio(file_path):
|
|
| 48 |
except Exception as e:
|
| 49 |
return f"An error occurred: {e}", None
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
iface = gr.Interface(
|
| 52 |
fn=process_audio,
|
| 53 |
inputs=gr.Audio(type="filepath"), # Use type="filepath"
|
| 54 |
outputs=[gr.Textbox(label="Response Text"), gr.Audio(label="Response Audio")],
|
| 55 |
-
live=True
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
)
|
| 57 |
|
| 58 |
iface.launch()
|
|
|
|
| 48 |
except Exception as e:
|
| 49 |
return f"An error occurred: {e}", None
|
| 50 |
|
| 51 |
+
title = " Voice-to-Voice Chatbot Application"
|
| 52 |
+
description = "Developed by [Adnan Tariq](https://www.linkedin.com/in/adnaantariq/) with ❤️"
|
| 53 |
+
article = "### Instructions\n1. Upload an audio file.\n2. Wait for the transcription.\n3. Listen to the chatbot's response."
|
| 54 |
+
|
| 55 |
+
|
| 56 |
iface = gr.Interface(
|
| 57 |
fn=process_audio,
|
| 58 |
inputs=gr.Audio(type="filepath"), # Use type="filepath"
|
| 59 |
outputs=[gr.Textbox(label="Response Text"), gr.Audio(label="Response Audio")],
|
| 60 |
+
live=True,
|
| 61 |
+
title=title,
|
| 62 |
+
description=description,
|
| 63 |
+
theme="dark",
|
| 64 |
+
article=article
|
| 65 |
)
|
| 66 |
|
| 67 |
iface.launch()
|