Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def musquery(payload):
|
|
| 21 |
return response.content
|
| 22 |
|
| 23 |
def generate_audio(prompt):
|
| 24 |
-
return
|
| 25 |
|
| 26 |
if subm_btn and img_prompt is not None:
|
| 27 |
def query(image_bytes):
|
|
@@ -35,7 +35,7 @@ if subm_btn and img_prompt is not None:
|
|
| 35 |
|
| 36 |
output = query(image_bytes)
|
| 37 |
prompt_gpt = output[0]['generated_text']
|
| 38 |
-
prompt = Client.create_completion("gpt3", "Write a prompt a to generate music from this: " + prompt_gpt)
|
| 39 |
st.info(f"Generated Prompt for input image: {prompt}", icon="ℹ️")
|
| 40 |
music = generate_audio(prompt)
|
| 41 |
st.success('Music Generated Successfully!', icon="✅")
|
|
|
|
| 21 |
return response.content
|
| 22 |
|
| 23 |
def generate_audio(prompt):
|
| 24 |
+
return musquery({"inputs": prompt})
|
| 25 |
|
| 26 |
if subm_btn and img_prompt is not None:
|
| 27 |
def query(image_bytes):
|
|
|
|
| 35 |
|
| 36 |
output = query(image_bytes)
|
| 37 |
prompt_gpt = output[0]['generated_text']
|
| 38 |
+
prompt = Client.create_completion("gpt3", "Write a short, very short prompt a to generate music from this: " + prompt_gpt)
|
| 39 |
st.info(f"Generated Prompt for input image: {prompt}", icon="ℹ️")
|
| 40 |
music = generate_audio(prompt)
|
| 41 |
st.success('Music Generated Successfully!', icon="✅")
|