Spaces:
Paused
Paused
File size: 6,161 Bytes
2dce015 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
import gradio as gr
### ### ### Music ### ### ###
INSTRUCTIONS = """
### <span style="color: red;"> ๐ฟ Basic ๐ฟ</span>
- **Specific Song:** Play Passionfruit | Play CRAZY by AXL
- **Controls:** Queue | Pause | Resume | Skip
- **More Info:** Explain this song
- **Album:** Play album Utopia | Play album Atlantis by Lilah
- **Playlist:** Play my Late Night Drive playlist
### <span style="color: red;"> ๐ฟ Personalized ๐ฟ</span>
- **Genre:** I'm happy, play country | Play energetic pop
- **Artist:** Play Migos hype songs | I'm sad, play Rihanna
- **Recommendations:** Recommend songs off my love for Drake + r&b
- **Create Playlist:** Make me a relaxing playlist of SZA-like songs
"""
# TODO add an image in the greeting
GREETING = """
Hi, I'm Apollo ๐ค, here to assist you with **all** your musical desires!
โจ Type **!help** to view commands โจ
For a more personalized experience, **tell me your mood**, or what you're doing ๐ฎ
"""
CHAT_HEADER = """
<div align='center'>
<h1 style='font-size: 26px;'>๐ฎ Apollo, Your AI Music Assistant ๐ฎ</h1>
<br>
<p style='font-size: 22px;'>Experience personalized, intelligent music interaction</p>
</div>
<div align='center' style='display: flex; align-items: flex-start; justify-content: center;'>
<div style='flex: 1; text-align: center; padding-right: 10px;'>
<h2 style='font-size: 20px;'><strong>๐ง Get Started ๐ง</strong></h2>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'>Connect your <span style='color: red;'>Spotify</span></p>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'>Type <code style='font-size: 24px;'>!help</code> for list of commands</p>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'>Or see the dropdown below</p>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'>Feedback is much appreciated</p>
</div>
<div>
<img src='file/mascot1.gif' style='opacity: 1.0;' width='400'/>
</div>
<div style='flex: 1; text-align: center; padding-left: 10px;'>
<h2 style='font-size: 20px;'><strong>๐ Main Features ๐</strong></h2>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'><span style='color: red;'>Chat</span> directly with Apollo</p>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'>Apollo uses your <span style='color: red;'>mood</span> & <span style='color: red;'>preferences</span></p>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'>Unsure? Apollo <span style='color: red;'>suggests</span></p>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'>Mood shift? Apollo <span style='color: red;'>adapts</span></p>
</div>
</div>
<div align='center' style='margin-top: 0 px;'>
<a href='#' style='font-size: 18px;'>Blog</a> |
<a href='#' style='font-size: 18px;'>GitHub</a> |
<a href='#' style='font-size: 18px;'>Website</a> |
<a href='#' style='font-size: 18px;'>Cool Demo</a> |
<a href='#' style='font-size: 18px;'>Tutorial</a>
</div>
"""
WARNING = """
<div>
<span style="color: red; font-size: 20px;">I really want to play music for you, but please authenticate your Spotify first</span>
</div>
"""
# THEME = gr.themes.Soft(primary_hue="red").set(
# body_background_fill="#F1F4F9",
# block_border_width="3px",
# )
### ### ### Authorization ### ### ###
AUTH_HEADER = """
<div align='center'>
<img src='file/mascot2.gif' style='opacity: 1.0;' width='400'/>
</div>
<div align='center' style='display: flex; justify-content: space-around; margin-top: 0px;'>
<div style='text-align: center;'>
<h2 style='font-size: 20px;'><strong>Local Installation</strong></h2>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'>See the dropdown below</p>
</div>
<div style='text-align: center;'>
<h2 style='font-size: 20px;'><strong>๐ How to Authenticate ๐</strong></h2>
<p style='font-size: 18px; line-height: 2.25;'>
1. Go to <a href='https://developer.spotify.com/' style='font-size: 18px;'><strong>Spotify Developer</strong></a> <br>
2. <strong>'Login'</strong> to your account, then go to <a href='https://developer.spotify.com/dashboard' style='font-size: 18px;'><strong>Dashboard</strong></a> <br>
3. <strong>'Create app'</strong> <br>
โข Put anything for name and description <br>
โข For <strong>'Redirect URI'</strong>, put <a href='http://www.jonaswaller.com' style='font-size: 18px;'><strong>www.jonaswaller.com</strong></a> <br>
4. Go to your app <strong>'Settings'</strong> and copy the <strong>'Client ID'</strong> <br>
</p>
</div>
<div style='text-align: center;'>
<h2 style='font-size: 20px;'><strong>Don't have Spotify?</strong></h2>
<p style='font-size: 18px; text-align: center; line-height: 2.25;'>See the dropdown below</p>
</div>
</div>
"""
DISCLAIMER = """
We utilize Spotify's Implicit Grant Flow which operates entirely client-side,
eliminating the need for server-side code and storage.
Apollo has limited permissions - we cannot delete or edit any existing content in your Spotify account;
access is strictly confined to adding new, curated playlists for you.
If multiple users are on Apollo simultaneously, each user is confined to their own isolated session,
preventing any cross-access to your Spotify account.
Your data is exclusively used for real-time music curation during your active session.
"""
LOCAL_INSTALL = """
Coming soon
"""
NEED_SPOTIFY = """
Want to test out Apollo, but don't have Spotify Premium? Email me for a free (testing) account.
stuart.j.waller@vanderbilt.edu
"""
### ### ### Feedback ### ### ###
FEED_HEADER = """
<div style='text-align: center;'>
<h2 style='font-size: 20px;'><strong>Thank You!</strong></h2>
<p style='font-size: 18px; line-height: 2.25;'>
Your feedback helps improve Apollo <br>
Or email me stuart.j.waller@vanderbilt.edu <br>
</p>
</div>
"""
|