Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,6 +27,21 @@ def infer(audio_file):
|
|
| 27 |
)
|
| 28 |
print(cap_result)
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
llama_q = f"""
|
| 31 |
|
| 32 |
I'll give you music description, then i want you to provide an image description that would fit well with the music.
|
|
@@ -34,7 +49,7 @@ def infer(audio_file):
|
|
| 34 |
|
| 35 |
Here's the music description :
|
| 36 |
|
| 37 |
-
{
|
| 38 |
|
| 39 |
"""
|
| 40 |
|
|
|
|
| 27 |
)
|
| 28 |
print(cap_result)
|
| 29 |
|
| 30 |
+
summarize_q = f"""
|
| 31 |
+
|
| 32 |
+
I'll give you a list of music description. Create a summary reflecting the musical ambiance.
|
| 33 |
+
Here's the list:
|
| 34 |
+
|
| 35 |
+
{cap_result}
|
| 36 |
+
"""
|
| 37 |
+
|
| 38 |
+
summary_result = client.predict(
|
| 39 |
+
summarize_q, # str in 'Message' Textbox component
|
| 40 |
+
api_name="/chat_1"
|
| 41 |
+
)
|
| 42 |
+
|
| 43 |
+
print(f"SUMMARY: {summary_result}")
|
| 44 |
+
|
| 45 |
llama_q = f"""
|
| 46 |
|
| 47 |
I'll give you music description, then i want you to provide an image description that would fit well with the music.
|
|
|
|
| 49 |
|
| 50 |
Here's the music description :
|
| 51 |
|
| 52 |
+
{summary_result}
|
| 53 |
|
| 54 |
"""
|
| 55 |
|