Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| import librosa | |
| from transformers import pipeline | |
| def analyze_comedy(audio): | |
| # Here you'll process the audio. For now, let's just return some basic info | |
| y, sr = librosa.load(audio, sr=None) | |
| duration = librosa.get_duration(y=y, sr=sr) | |
| return f"Audio Duration: {duration:.2f} seconds" | |
| iface = gr.Interface( | |
| fn=analyze_comedy, | |
| inputs=gr.Audio(source="upload", type="filepath"), | |
| outputs="text", | |
| title="Stand-Up Comedy Tone Analyzer", | |
| description="Upload a comedy audio clip to analyze its tone and comedic elements." | |
| ) | |
| iface.launch() |