Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -26,11 +26,11 @@ def get_prompts(uploaded_image, track_duration, gen_intensity, gen_mode):
|
|
26 |
#prompt = img_to_text(uploaded_image, "ViT-L (best for Stable Diffusion 1.*)", "fast", fn_index=1)[0]
|
27 |
prompt = img_to_text(uploaded_image, 'fast', 4, fn_index=1)[0]
|
28 |
print(prompt)
|
29 |
-
|
30 |
-
music_result = get_music(prompt, track_duration, gen_intensity, gen_mode)
|
31 |
#music_result = generate_track_by_prompt(pat, prompt, track_duration, gen_intensity, gen_mode)
|
32 |
#print(pat)
|
33 |
-
return
|
34 |
|
35 |
#from utils import get_tags_for_prompts, get_mubert_tags_embeddings, get_pat
|
36 |
|
@@ -44,8 +44,8 @@ def get_pat_token():
|
|
44 |
"params": {
|
45 |
"email":"mail@mail.com",
|
46 |
"phone":"+11234567890",
|
47 |
-
"license":
|
48 |
-
"token":
|
49 |
|
50 |
}
|
51 |
})
|
@@ -55,7 +55,7 @@ def get_pat_token():
|
|
55 |
#assert rdata['status'] == 1, "probably incorrect e-mail"
|
56 |
#pat = rdata['data']['pat']
|
57 |
print(rdata)
|
58 |
-
return
|
59 |
|
60 |
def get_music(prompt, track_duration, gen_intensity, gen_mode):
|
61 |
|
|
|
26 |
#prompt = img_to_text(uploaded_image, "ViT-L (best for Stable Diffusion 1.*)", "fast", fn_index=1)[0]
|
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(prompt, track_duration, gen_intensity, gen_mode)
|
31 |
#music_result = generate_track_by_prompt(pat, prompt, track_duration, gen_intensity, gen_mode)
|
32 |
#print(pat)
|
33 |
+
return pat, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
34 |
|
35 |
#from utils import get_tags_for_prompts, get_mubert_tags_embeddings, get_pat
|
36 |
|
|
|
44 |
"params": {
|
45 |
"email":"mail@mail.com",
|
46 |
"phone":"+11234567890",
|
47 |
+
"license": MUBERT_LICENSE,
|
48 |
+
"token": MUBERT_TOKEN,
|
49 |
|
50 |
}
|
51 |
})
|
|
|
55 |
#assert rdata['status'] == 1, "probably incorrect e-mail"
|
56 |
#pat = rdata['data']['pat']
|
57 |
print(rdata)
|
58 |
+
return "done"
|
59 |
|
60 |
def get_music(prompt, track_duration, gen_intensity, gen_mode):
|
61 |
|