ASG Models commited on
Commit
6882990
1 Parent(s): 02974f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -3,12 +3,6 @@ import os
3
  import numpy as np
4
 
5
  import gradio as gr
6
-
7
-
8
- def reverse_audio(audio):
9
- data = audio
10
- return (16000, np.flipud(data))
11
-
12
  # Use a pipeline as a high-level helper
13
  import requests
14
 
@@ -19,9 +13,15 @@ def query(text):
19
  response = requests.post(API_URL, json=payload)
20
  return response.content
21
 
 
 
 
 
 
 
22
  demo = gr.Interface(
23
  fn=reverse_audio,
24
- inputs=query,
25
  outputs="audio"
26
  )
27
 
 
3
  import numpy as np
4
 
5
  import gradio as gr
 
 
 
 
 
 
6
  # Use a pipeline as a high-level helper
7
  import requests
8
 
 
13
  response = requests.post(API_URL, json=payload)
14
  return response.content
15
 
16
+
17
+ def reverse_audio(text):
18
+ data = query(text)
19
+ return (16000, np.flipud(data))
20
+
21
+
22
  demo = gr.Interface(
23
  fn=reverse_audio,
24
+ inputs="text",
25
  outputs="audio"
26
  )
27