seawolf2357 commited on
Commit
093e936
ยท
verified ยท
1 Parent(s): 6b5c656

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -18,16 +18,15 @@ def generate_music(image_classification_result):
18
  # ์Œ์•… ์ƒ์„ฑ API ํ˜ธ์ถœ
19
  client = Client("https://haoheliu-audioldm2-text2audio-text2music.hf.space/")
20
  result = client.predict(
21
- prompt=full_prompt, # ๊ธฐ๋ณธ ํ”„๋กฌํ”„ํŠธ
22
- negative_prompt=negative_prompt, # ๋ถ€์ •์ ์ธ ํ”„๋กฌํ”„ํŠธ
23
- prompt,
24
- prompt, # ์Œ์„ฑ ์ƒ์„ฑ์— ์‚ฌ์šฉ๋  ํ”„๋กฌํ”„ํŠธ
25
- 5, # ์Œ์•…์˜ ๊ธธ์ด (์ดˆ)
26
- 0, # ๊ฐ€์ด๋˜์Šค ์Šค์ผ€์ผ
27
- 5, # ์‹œ๋“œ ๊ฐ’
28
- 1, # ์ƒ์„ฑํ•  waveform์˜ ์ˆ˜
29
- fn_index=1 # ํ•จ์ˆ˜ ์ธ๋ฑ์Šค
30
  )
 
31
  # API ํ˜ธ์ถœ ๊ฒฐ๊ณผ ์ฒ˜๋ฆฌ
32
  return result
33
 
 
18
  # ์Œ์•… ์ƒ์„ฑ API ํ˜ธ์ถœ
19
  client = Client("https://haoheliu-audioldm2-text2audio-text2music.hf.space/")
20
  result = client.predict(
21
+ prompt=full_prompt,
22
+ negative_prompt=negative_prompt,
23
+ duration=5, # ์Œ์•…์˜ ๊ธธ์ด (์ดˆ), ํ‚ค์›Œ๋“œ ์ธ์ž๋กœ ๋ณ€๊ฒฝ
24
+ guidance_scale=0, # ๊ฐ€์ด๋˜์Šค ์Šค์ผ€์ผ, ํ‚ค์›Œ๋“œ ์ธ์ž๋กœ ๋ณ€๊ฒฝ
25
+ seed=5, # ์‹œ๋“œ ๊ฐ’, ํ‚ค์›Œ๋“œ ์ธ์ž๋กœ ๋ณ€๊ฒฝ
26
+ num_waveforms=1, # ์ƒ์„ฑํ•  waveform์˜ ์ˆ˜, ํ‚ค์›Œ๋“œ ์ธ์ž๋กœ ๋ณ€๊ฒฝ
27
+ fn_index=1 # ํ•จ์ˆ˜ ์ธ๋ฑ์Šค, ์ด๋ฏธ ํ‚ค์›Œ๋“œ ์ธ์ž๋กœ ๋˜์–ด ์žˆ์Œ
 
 
28
  )
29
+
30
  # API ํ˜ธ์ถœ ๊ฒฐ๊ณผ ์ฒ˜๋ฆฌ
31
  return result
32