Spaces:
Sleeping
Sleeping
Update instructions
Browse files- tools/analysis_tools.py +2 -2
- tools/formatting_tools.py +7 -8
tools/analysis_tools.py
CHANGED
|
@@ -43,7 +43,7 @@ class AnalyzeLyricsTool(Tool):
|
|
| 43 |
|
| 44 |
1. Overall analysis of the song including themes, mood, meaning, and context.
|
| 45 |
2. Section-by-section meaning analysis of each part of the song (verses, chorus, bridge, etc.).
|
| 46 |
-
4. A conclusion about the vibes and concepts of the underlying meaning of the song.
|
| 47 |
|
| 48 |
Format your response as a valid JSON object with the following structure:
|
| 49 |
```
|
|
@@ -60,7 +60,7 @@ class AnalyzeLyricsTool(Tool):
|
|
| 60 |
}},
|
| 61 |
...
|
| 62 |
],
|
| 63 |
-
"conclusion": "The song vibes and concepts of the underlying meaning"
|
| 64 |
}}
|
| 65 |
```
|
| 66 |
|
|
|
|
| 43 |
|
| 44 |
1. Overall analysis of the song including themes, mood, meaning, and context.
|
| 45 |
2. Section-by-section meaning analysis of each part of the song (verses, chorus, bridge, etc.).
|
| 46 |
+
4. A conclusion about the vibes and concepts of the underlying meaning of the song. Try to get deeper into the meaning of the song if the text has the potential.
|
| 47 |
|
| 48 |
Format your response as a valid JSON object with the following structure:
|
| 49 |
```
|
|
|
|
| 60 |
}},
|
| 61 |
...
|
| 62 |
],
|
| 63 |
+
"conclusion": "The song vibes and concepts of the underlying meaning, including ideas author may have intended to express"
|
| 64 |
}}
|
| 65 |
```
|
| 66 |
|
tools/formatting_tools.py
CHANGED
|
@@ -51,14 +51,13 @@ class FormatAnalysisResultsTool(Tool):
|
|
| 51 |
console = Console(record=True, width=100)
|
| 52 |
|
| 53 |
# Create a custom theme for consistent styling
|
|
|
|
| 54 |
custom_theme = Theme({
|
| 55 |
"heading": "bold cyan underline",
|
| 56 |
-
"subheading": "bold blue",
|
| 57 |
"highlight": "bold yellow",
|
| 58 |
"positive": "green",
|
| 59 |
"negative": "red",
|
| 60 |
"neutral": "magenta",
|
| 61 |
-
"section": "cyan",
|
| 62 |
"quote": "italic yellow",
|
| 63 |
"metadata": "dim white"
|
| 64 |
})
|
|
@@ -72,7 +71,7 @@ class FormatAnalysisResultsTool(Tool):
|
|
| 72 |
|
| 73 |
# Create a table for the main themes and mood
|
| 74 |
info_table = Table(show_header=False, box=ROUNDED, expand=True)
|
| 75 |
-
info_table.add_column("Key", style="
|
| 76 |
info_table.add_column("Value")
|
| 77 |
|
| 78 |
# Add the mood
|
|
@@ -105,17 +104,17 @@ class FormatAnalysisResultsTool(Tool):
|
|
| 105 |
|
| 106 |
if lines:
|
| 107 |
lyrics_text = "\n".join([f"> [quote]{line}[/]" for line in lines])
|
| 108 |
-
section_content.append(Text("Lyrics:", style="
|
| 109 |
section_content.append(Markdown(lyrics_text))
|
| 110 |
|
| 111 |
-
section_content.append(Text("Analysis:", style="
|
| 112 |
section_content.append(Text(section_analysis))
|
| 113 |
|
| 114 |
# Add the section panel
|
| 115 |
console.print(Panel(
|
| 116 |
Group(*section_content),
|
| 117 |
-
title=f"[
|
| 118 |
-
border_style="
|
| 119 |
))
|
| 120 |
|
| 121 |
# Significant lines
|
|
@@ -128,7 +127,7 @@ class FormatAnalysisResultsTool(Tool):
|
|
| 128 |
significance = line_data.get("significance", "")
|
| 129 |
|
| 130 |
console.print(Panel(
|
| 131 |
-
f"[quote]\"{line}\"[/]\n\n[
|
| 132 |
title=f"[highlight]Key Line #{i+1}[/]",
|
| 133 |
border_style="highlight"
|
| 134 |
))
|
|
|
|
| 51 |
console = Console(record=True, width=100)
|
| 52 |
|
| 53 |
# Create a custom theme for consistent styling
|
| 54 |
+
# Using direct style definitions instead of named styles
|
| 55 |
custom_theme = Theme({
|
| 56 |
"heading": "bold cyan underline",
|
|
|
|
| 57 |
"highlight": "bold yellow",
|
| 58 |
"positive": "green",
|
| 59 |
"negative": "red",
|
| 60 |
"neutral": "magenta",
|
|
|
|
| 61 |
"quote": "italic yellow",
|
| 62 |
"metadata": "dim white"
|
| 63 |
})
|
|
|
|
| 71 |
|
| 72 |
# Create a table for the main themes and mood
|
| 73 |
info_table = Table(show_header=False, box=ROUNDED, expand=True)
|
| 74 |
+
info_table.add_column("Key", style="bold blue")
|
| 75 |
info_table.add_column("Value")
|
| 76 |
|
| 77 |
# Add the mood
|
|
|
|
| 104 |
|
| 105 |
if lines:
|
| 106 |
lyrics_text = "\n".join([f"> [quote]{line}[/]" for line in lines])
|
| 107 |
+
section_content.append(Text("Lyrics:", style="bold blue"))
|
| 108 |
section_content.append(Markdown(lyrics_text))
|
| 109 |
|
| 110 |
+
section_content.append(Text("Analysis:", style="bold blue"))
|
| 111 |
section_content.append(Text(section_analysis))
|
| 112 |
|
| 113 |
# Add the section panel
|
| 114 |
console.print(Panel(
|
| 115 |
Group(*section_content),
|
| 116 |
+
title=f"[bold cyan]{section_title}[/]",
|
| 117 |
+
border_style="cyan"
|
| 118 |
))
|
| 119 |
|
| 120 |
# Significant lines
|
|
|
|
| 127 |
significance = line_data.get("significance", "")
|
| 128 |
|
| 129 |
console.print(Panel(
|
| 130 |
+
f"[quote]\"{line}\"[/]\n\n[bold blue]Significance:[/] {significance}",
|
| 131 |
title=f"[highlight]Key Line #{i+1}[/]",
|
| 132 |
border_style="highlight"
|
| 133 |
))
|