fffiloni commited on
Commit
ffa3b72
Ā·
1 Parent(s): 75419f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -118,7 +118,7 @@ def get_prompts(uploaded_image, track_duration, gen_intensity, gen_mode, openai_
118
  musical_prompt = prompt
119
  music_result = get_results(musical_prompt, track_duration, gen_intensity, gen_mode)
120
 
121
- wave_file = convert_mp3_to_wav(music_result)
122
 
123
  time.sleep(1)
124
  return wave_file, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
@@ -159,7 +159,7 @@ def try_api(message, openai_api_key):
159
 
160
  def call_api(message, openai_api_key):
161
 
162
- instruction = "Convert this image description in a very concise way with musical terms as if you wanted to translate it to music, less than 200 characters"
163
 
164
  print("starting open ai")
165
  augmented_prompt = f"{instruction}: '{message}'."
 
118
  musical_prompt = prompt
119
  music_result = get_results(musical_prompt, track_duration, gen_intensity, gen_mode)
120
 
121
+ wave_file = convert_mp3_to_wav("sample.mp3")
122
 
123
  time.sleep(1)
124
  return wave_file, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
 
159
 
160
  def call_api(message, openai_api_key):
161
 
162
+ instruction = "Convert this image description in a very concise way with musical terms, as if you wanted to describe a music that would fit this image, with less than 200 characters"
163
 
164
  print("starting open ai")
165
  augmented_prompt = f"{instruction}: '{message}'."