Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -111,7 +111,7 @@ def get_prompts(uploaded_image, track_duration, gen_intensity, gen_mode, openai_
|
|
111 |
|
112 |
prompt = img_to_text(uploaded_image, 'best', 4, fn_index=1)[0]
|
113 |
print(prompt)
|
114 |
-
|
115 |
print(f"prompt cleaned: {prompt}")
|
116 |
musical_prompt = 'You did not use any OpenAI API key to pimp your result :)'
|
117 |
if openai_api_key is not None:
|
@@ -121,9 +121,9 @@ def get_prompts(uploaded_image, track_duration, gen_intensity, gen_mode, openai_
|
|
121 |
print(f"musical adapt: {musical_prompt}")
|
122 |
music_result = get_results(musical_prompt, track_duration, gen_intensity, gen_mode)
|
123 |
else:
|
124 |
-
music_result = get_results(
|
125 |
else:
|
126 |
-
music_result = get_results(
|
127 |
|
128 |
show_prompts = f"""
|
129 |
CLIP Interrogator Caption: '{prompt}'
|
|
|
111 |
|
112 |
prompt = img_to_text(uploaded_image, 'best', 4, fn_index=1)[0]
|
113 |
print(prompt)
|
114 |
+
clean_prompt = clean_text(prompt)
|
115 |
print(f"prompt cleaned: {prompt}")
|
116 |
musical_prompt = 'You did not use any OpenAI API key to pimp your result :)'
|
117 |
if openai_api_key is not None:
|
|
|
121 |
print(f"musical adapt: {musical_prompt}")
|
122 |
music_result = get_results(musical_prompt, track_duration, gen_intensity, gen_mode)
|
123 |
else:
|
124 |
+
music_result = get_results(clean_prompt, track_duration, gen_intensity, gen_mode)
|
125 |
else:
|
126 |
+
music_result = get_results(clean_prompt, track_duration, gen_intensity, gen_mode)
|
127 |
|
128 |
show_prompts = f"""
|
129 |
CLIP Interrogator Caption: '{prompt}'
|