NonameSsSs commited on
Commit
6a48c9f
·
verified ·
1 Parent(s): 16392af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -12,8 +12,7 @@ def generate_tone(note, octave, duration):
12
  audio = (20000 * np.sin(audio * (2 * np.pi * frequency))).astype(np.int16)
13
  return sr, audio
14
 
15
-
16
- demo = gr.Interface(
17
  generate_tone,
18
  [
19
  gr.Dropdown(notes, type="index"),
@@ -22,5 +21,8 @@ def generate_tone(note, octave, duration):
22
  ],
23
  "audio",
24
  )
 
 
 
25
  while True:
26
  demo.launch()
 
12
  audio = (20000 * np.sin(audio * (2 * np.pi * frequency))).astype(np.int16)
13
  return sr, audio
14
 
15
+ demo = gr.Interface(
 
16
  generate_tone,
17
  [
18
  gr.Dropdown(notes, type="index"),
 
21
  ],
22
  "audio",
23
  )
24
+ if __name__ == "__main__":
25
+ demo.launch()
26
+
27
  while True:
28
  demo.launch()