Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
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 |
|