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 |
prompt = img_to_text(uploaded_image, 'best', 4, fn_index=1)[0]
|
112 |
print(prompt)
|
113 |
musical_prompt = 'You did not use any OpenAI API key to pimp your result :)'
|
114 |
-
if openai_api_key
|
115 |
gpt_adaptation = try_api(prompt, openai_api_key)
|
116 |
if gpt_adaptation[0] != "oups":
|
117 |
musical_prompt = gpt_adaptation[0]
|
|
|
111 |
prompt = img_to_text(uploaded_image, 'best', 4, fn_index=1)[0]
|
112 |
print(prompt)
|
113 |
musical_prompt = 'You did not use any OpenAI API key to pimp your result :)'
|
114 |
+
if openai_api_key is not None:
|
115 |
gpt_adaptation = try_api(prompt, openai_api_key)
|
116 |
if gpt_adaptation[0] != "oups":
|
117 |
musical_prompt = gpt_adaptation[0]
|