seawolf2357 commited on
Commit
46ad89d
ยท
verified ยท
1 Parent(s): e8d7309

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -22,18 +22,16 @@ def generate_music(prompt):
22
  return result"""
23
  client = Client("https://haoheliu-audioldm-48k-text-to-hifiaudio-generation.hf.space/")
24
  result = client.predict(
25
- "Howdy!", # str in 'Input your text here. If the output is not good enough, switching to a different seed will help.' Textbox component
26
- 5, # int | float (numeric value between 5 and 15)
27
- in 'Duration (seconds)' Slider component
28
- 0, # int | float (numeric value between 0 and 6)
29
- in 'Guidance scale (Large => better quality and relavancy to text; Small => better diversity)' Slider component
30
- 5, # int | float in 'Change this value (any integer number) will lead to a different generation result.' Number component
31
- 1, # int | float (numeric value between 1 and 3)
32
- in 'Automatic quality control. This number control the number of candidates (e.g., generate three audios and choose the best to show you). A Larger value usually lead to better quality with heavier computation' Slider component
33
- api_name="/text2audio"
34
  )
35
  print(result)
36
 
 
37
  def generate_voice(prompt):
38
  # Tango API๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์Œ์„ฑ ์ƒ์„ฑ
39
  client = Client("https://declare-lab-tango.hf.space/")
 
22
  return result"""
23
  client = Client("https://haoheliu-audioldm-48k-text-to-hifiaudio-generation.hf.space/")
24
  result = client.predict(
25
+ prompt="Howdy!", # 'Input your text here' ํ…์ŠคํŠธ ๋ฐ•์Šค ์ปดํฌ๋„ŒํŠธ
26
+ duration=5, # 'Duration (seconds)' ์Šฌ๋ผ์ด๋” ์ปดํฌ๋„ŒํŠธ์—์„œ์˜ ๊ฐ’ ๋ฒ”์œ„ (5 ~ 15)
27
+ guidance_scale=0, # 'Guidance scale' ์Šฌ๋ผ์ด๋” ์ปดํฌ๋„ŒํŠธ์—์„œ์˜ ๊ฐ’ ๋ฒ”์œ„ (0 ~ 6)
28
+ seed=5, # 'Seed' ์ˆซ์ž ์ปดํฌ๋„ŒํŠธ์˜ ๊ฐ’
29
+ num_waveforms=1, # 'Number waveforms to generate' ์Šฌ๋ผ์ด๋” ์ปดํฌ๋„ŒํŠธ์—์„œ์˜ ๊ฐ’ ๋ฒ”์œ„ (1 ~ 3)
30
+ api_name="/text2audio" # API ์—”๋“œํฌ์ธํŠธ ๊ฒฝ๋กœ
 
 
 
31
  )
32
  print(result)
33
 
34
+
35
  def generate_voice(prompt):
36
  # Tango API๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์Œ์„ฑ ์ƒ์„ฑ
37
  client = Client("https://declare-lab-tango.hf.space/")