Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -5,20 +5,28 @@ img_to_text = gr.Blocks.load(name="spaces/pharma/CLIP-Interrogator")
|
|
5 |
text_to_music = gr.Interface.load("spaces/Mubert/Text-to-Music")
|
6 |
|
7 |
def get_prompts(uploaded_image):
|
|
|
|
|
8 |
prompt = img_to_text(uploaded_image, fn_index=1)[0]
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
music_result = get_music(prompt)
|
12 |
|
13 |
return music_result
|
14 |
|
15 |
def get_music(prompt):
|
|
|
16 |
email = "[email protected]"
|
17 |
duration = 30
|
18 |
-
result = text_to_music(email, prompt, duration)
|
19 |
|
20 |
-
output = os.path.join(result)
|
21 |
-
print(output)
|
22 |
return prompt
|
23 |
|
24 |
with gr.Blocks() as demo:
|
|
|
5 |
text_to_music = gr.Interface.load("spaces/Mubert/Text-to-Music")
|
6 |
|
7 |
def get_prompts(uploaded_image):
|
8 |
+
print("calling Clip interrogator ...")
|
9 |
+
|
10 |
prompt = img_to_text(uploaded_image, fn_index=1)[0]
|
11 |
+
|
12 |
+
print(f"""βββ
|
13 |
+
Got prompt result:
|
14 |
+
{prompt}
|
15 |
+
βββββββ
|
16 |
+
""")
|
17 |
|
18 |
music_result = get_music(prompt)
|
19 |
|
20 |
return music_result
|
21 |
|
22 |
def get_music(prompt):
|
23 |
+
print("calling now mubert ....")
|
24 |
email = "[email protected]"
|
25 |
duration = 30
|
26 |
+
#result = text_to_music(email, prompt, duration)
|
27 |
|
28 |
+
#output = os.path.join(result)
|
29 |
+
#print(output)
|
30 |
return prompt
|
31 |
|
32 |
with gr.Blocks() as demo:
|