crypto-code commited on
Commit
1a96fe3
β€’
1 Parent(s): 872746b

Add more examples

Browse files
Files changed (5) hide show
  1. .gitattributes +1 -0
  2. app.py +6 -4
  3. examples/drums.mp3 +3 -0
  4. examples/guitar.jpeg +0 -0
  5. examples/piano.mp3 +3 -0
.gitattributes CHANGED
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  ckpts/checkpoint.pth filter=lfs diff=lfs merge=lfs -text
 
 
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  ckpts/checkpoint.pth filter=lfs diff=lfs merge=lfs -text
37
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -301,7 +301,7 @@ with gr.Blocks() as demo:
301
  with gr.Group():
302
  with gr.Accordion('Text Advanced Options', open=True):
303
  top_p = gr.Slider(0, 1, value=0.95, step=0.01, label="Top P", interactive=True)
304
- temperature = gr.Slider(0, 1, value=0.4, step=0.01, label="Temperature", interactive=True)
305
  with gr.Accordion('Audio Advanced Options', open=False):
306
  audio_length_in_s = gr.Slider(5, 30, value=30, step=1, label="The audio length in seconds",
307
  interactive=True)
@@ -316,8 +316,10 @@ with gr.Blocks() as demo:
316
  uid = gr.State(uuid.uuid4())
317
  gr.Examples(inputs=[user_input, image_path, audio_path, video_path],
318
  examples=[["Generate a music to match the image", "./examples/drums.webp", None, None],
319
- ["Generate a music to match the mood of the black and white image", "./examples/sad.jpeg", None, None],
320
- ["Replace the piano with an accoustic guitar", None, "./examples/piano.wav", None]])
 
 
321
 
322
  submitBtn.click(
323
  predict, [
@@ -354,4 +356,4 @@ with gr.Blocks() as demo:
354
  ], show_progress=True)
355
 
356
  if __name__ == "__main__":
357
- demo.launch()
 
301
  with gr.Group():
302
  with gr.Accordion('Text Advanced Options', open=True):
303
  top_p = gr.Slider(0, 1, value=0.95, step=0.01, label="Top P", interactive=True)
304
+ temperature = gr.Slider(0, 1, value=0.2, step=0.01, label="Temperature", interactive=True)
305
  with gr.Accordion('Audio Advanced Options', open=False):
306
  audio_length_in_s = gr.Slider(5, 30, value=30, step=1, label="The audio length in seconds",
307
  interactive=True)
 
316
  uid = gr.State(uuid.uuid4())
317
  gr.Examples(inputs=[user_input, image_path, audio_path, video_path],
318
  examples=[["Generate a music to match the image", "./examples/drums.webp", None, None],
319
+ ["Generate a music to match the mood of the black and white image", "./examples/sad.jpeg", None, None],
320
+ ["Generate a music using the instrument in the image", "./examples/guitar.jpeg", None, None],
321
+ ["Replace the piano in the music with an acoustic guitar", None, "./examples/piano.mp3", None],
322
+ ["Extract the drums from the following music", None, "./examples/drums.mp3", None]]])
323
 
324
  submitBtn.click(
325
  predict, [
 
356
  ], show_progress=True)
357
 
358
  if __name__ == "__main__":
359
+ demo.launch()
examples/drums.mp3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c15f894a3cd2a6ce3be29f9c3953ac4ea8e20c144b313c39fc1307dd3dbd4884
3
+ size 1199695
examples/guitar.jpeg ADDED
examples/piano.mp3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:976d765fdfde2dac6cf4b2f9b85682ec45ad27d21bff21726f02d7d4eb591e90
3
+ size 584594