InferenceLab commited on
Commit
537071d
·
verified ·
1 Parent(s): 31fce29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -57,10 +57,10 @@ async def generate_music(prompt, bpm, temperature):
57
 
58
  # Return numpy array for playback (gr.Audio)
59
  audio_np = np.frombuffer(all_pcm, dtype=np.int16)
60
- return (24000, audio_np), output_path, "Music generated successfully!"
61
 
62
  except Exception as e:
63
- return None, None, f"Error: {str(e)}"
64
 
65
  # Sync wrapper for Gradio (uses event loop)
66
  def generate_music_gradio(prompt, bpm, temperature):
@@ -91,7 +91,7 @@ with gr.Blocks(title="🎵 Gemini Lyria Music Generator") as demo:
91
  status_output = gr.Textbox(label="Status", interactive=False)
92
 
93
  with gr.Group():
94
- gr.Markdown("### 🔁 Try These Examples")
95
  examples = gr.Examples(
96
  examples=[
97
  ["ambient synth in a forest", 100, 1.2],
 
57
 
58
  # Return numpy array for playback (gr.Audio)
59
  audio_np = np.frombuffer(all_pcm, dtype=np.int16)
60
+ return (24000, audio_np), output_path, "Music generated successfully!"
61
 
62
  except Exception as e:
63
+ return None, None, f"Error: {str(e)}"
64
 
65
  # Sync wrapper for Gradio (uses event loop)
66
  def generate_music_gradio(prompt, bpm, temperature):
 
91
  status_output = gr.Textbox(label="Status", interactive=False)
92
 
93
  with gr.Group():
94
+ gr.Markdown("###Try These Examples")
95
  examples = gr.Examples(
96
  examples=[
97
  ["ambient synth in a forest", 100, 1.2],