Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,8 @@ def get_prompts(uploaded_image, track_duration, gen_intensity, gen_mode):
|
|
27 |
prompt = img_to_text(uploaded_image, 'fast', 4, fn_index=1)[0]
|
28 |
print(prompt)
|
29 |
pat = get_pat_token()
|
30 |
-
music_result =
|
|
|
31 |
print(music_result)
|
32 |
return music_result[0], gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
33 |
|
@@ -55,6 +56,10 @@ def get_pat_token():
|
|
55 |
pat = rdata['data']['pat']
|
56 |
|
57 |
return pat
|
|
|
|
|
|
|
|
|
58 |
|
59 |
def get_track_by_tags(tags, pat, duration, gen_intensity, gen_mode, maxit=20):
|
60 |
|
|
|
27 |
prompt = img_to_text(uploaded_image, 'fast', 4, fn_index=1)[0]
|
28 |
print(prompt)
|
29 |
pat = get_pat_token()
|
30 |
+
music_result = get_music(pat, prompt, track_duration, gen_intensity, gen_mode)
|
31 |
+
#music_result = generate_track_by_prompt(pat, prompt, track_duration, gen_intensity, gen_mode)
|
32 |
print(music_result)
|
33 |
return music_result[0], gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
34 |
|
|
|
56 |
pat = rdata['data']['pat']
|
57 |
|
58 |
return pat
|
59 |
+
|
60 |
+
def get_music(pat, prompt, track_duration, gen_intensity, gen_mode):
|
61 |
+
|
62 |
+
return track
|
63 |
|
64 |
def get_track_by_tags(tags, pat, duration, gen_intensity, gen_mode, maxit=20):
|
65 |
|