aliabd HF staff commited on
Commit
2eacdb4
·
1 Parent(s): 5ce0e7d

Upload with huggingface_hub

Browse files
README.md CHANGED
@@ -1,12 +1,11 @@
 
1
  ---
2
- title: Reverse Audio Main
3
- emoji: 🚀
4
- colorFrom: pink
5
- colorTo: red
6
  sdk: gradio
7
  sdk_version: 3.6
8
- app_file: app.py
9
  pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+
2
  ---
3
+ title: reverse_audio_main
4
+ emoji: 🔥
5
+ colorFrom: indigo
6
+ colorTo: indigo
7
  sdk: gradio
8
  sdk_version: 3.6
9
+ app_file: run.py
10
  pinned: false
11
  ---
 
 
__pycache__/run.cpython-36.pyc ADDED
Binary file (454 Bytes). View file
 
audio/cantina.wav ADDED
Binary file (132 kB). View file
 
audio/recording1.wav ADDED
Binary file (639 kB). View file
 
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ https://gradio-main-build.s3.amazonaws.com/c3bec6153737855510542e8154391f328ac72606/gradio-3.6-py3-none-any.whl
run.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ import numpy as np
4
+
5
+ import gradio as gr
6
+
7
+
8
+ def reverse_audio(audio):
9
+ sr, data = audio
10
+ return (sr, np.flipud(data))
11
+
12
+
13
+ demo = gr.Interface(fn=reverse_audio,
14
+ inputs="microphone",
15
+ outputs="audio",
16
+ examples=[
17
+ "https://samplelib.com/lib/preview/mp3/sample-3s.mp3",
18
+ os.path.join(os.path.dirname(__file__), "audio/recording1.wav")
19
+ ], cache_examples=True)
20
+
21
+ if __name__ == "__main__":
22
+ demo.launch()
screenshot.png ADDED