Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from transformers import pipeline | |
| pipe = pipeline("text-classification", model="Rveen/p4k-longformer", function_to_apply="none") | |
| def predict(text): | |
| return pipe(text)[0]['score'] | |
| input_component = gr.Textbox( | |
| label="Input Text (or click an example below!)", | |
| info="Insert review text here", | |
| lines=3, | |
| ) | |
| output_component = gr.Number(label="Predicted Rating:") | |
| iface = gr.Interface( | |
| fn=predict, | |
| inputs=input_component, | |
| outputs=output_component, | |
| title="Music Album Rating Prediction", | |
| description="Predict a rating (0-10) for a music album based on text review! Model was trained on Pitchfork album reviews.", | |
| examples=[["I love this album, it's a masterpiece"], | |
| ["Every track is decent. The highs are really high while the lows are not that low. It's a change of direction compared to their previous work."], | |
| ["Worst album of all time. Every song is really bad and uninspired"], | |
| ["Hi everyone. Anthony Fantano here, the internet\'s busiest music nerd, it\'s time for an album review, an album that everyone has been begging for. Begging for, begging. Kanye West\'s \"My Beautiful Dark Twisted Fantasy\". Before listening to this album, I had all of this stuff just running through my head, things I would say to kind of preface this review, stuff like \"Hey, you know, the stuff like the VMA\'s, the Today Show interview, the Katrina/George Bush debacle, all the media gaffes, all that stuff, that\'s just context, man. It\'s not important. This is music. Pay attention to the music. Leave your hate at the door\". It\'s a very similar argument I made when I reviewed MIA\'s last album. But the more I listened to Twisted Fantasy, the more I kind of came to realize that that position is total and utter bullsh*t. Not because Kanye\'s gaffes are so unforgivable that we need to scrutinize this album using everything he says. That\'s not the case. The reason it\'s hard to ignore context on this LP is because Kanye\'s favorite thing to rap about is himself. On here he puts both his strengths and his flaws on display. And it kind of makes me wonder what his \"beautiful dark twisted fantasy\" is. Is it himself? Is it his life? Is it an album about his life? Basically the music here and Kanye West\'s personal life are pretty inseparable on this album. The lyrics here reference everything to the fish sticks joke on South Park to the dude\'s very emotionally damaged love life. Rhyme wise, flow wise, I feel like Kanye is really creative here, very much on the ball, like the opener Dark Fantasy, there\'s a point where I laughed my ass off, when he said \"you got too many Urkels on your team, thats why you Winslow\". DAAAAAAAMN! I\'m loving a lot of the rhymes here, and even when I don\'t like a certain track, they are a little bit of a saving grace for me. And I think that track is a particularly awesome start to the album, just kind of paints Kanye\'s rise to the top, and it\'s a little exciting. But Kanye does not just think of himself as a rapper, he also feels he is a singer. And I will say, singing is not the strongest tool in Kanye\'s toolbox, sometimes his singing is a little off. But it basically gets the job done. But the best thing this LP has going for it for me is the beats, the production. Just great sounds, interesting samples. I remember when watching live performances of the song POWER I didn\'t exactly know how to feel about the King Crimson sample in that track but I\'m really loving the studio version. The song clips flow together really well in that song and make something that\'s really really cinematic. It\'s just kind of a brave new world for sampling in my opinion. I\'ve always been a fan of sampling, always been an advocate, always felt like there\'s so much more potential for it but copyright is kind of standing in the way of that. I would say the song POWER is a great example of the artistry that sampling music can offer if the artist is freely allowed to do so. And there are other tracks that surprisingly enough do a lot with a little, like the song Monster just has, not really lush sounds, but very kind of stripped down and simple, primal drums, minimal synthesizers, but still sounds very dramatic and kind of eerie. The track Blame Game kind of fits that bill too, very dramatic but not overdoing it. There\'s soul samples on here, a very fiery and classic spoken word piece delivered by Gil Scott-Heron, crowd sounds, just a lot of clips flying by every moment on this album. Whether you like Kanye or not, this thing is ambitious as hell, especially from a sonic perspective. All the tracks flow together really well, it\'s very cohesive, Kanye takes most of his guest MC spots and relegates them to a few posse tracks that come together really well. And even though I\'m not the biggest Nicki Minaj fan, the biggest Rick Ross fan, they contribute some pretty good stuff to the album. But, gripes gripes gripes, because there are gripes that I have, and sort of the first one, maybe an appetizer, are the hooks. A lot of the hooks on this thing, either to me, anyway, just an opinion, kind of come off a little corny or a little generic. I\'m thinking of tracks like Hell of a Life, So Appalled, All of the Lights, maybe something that I could just kind of come across on any new rap song in the mainstream on the radio. And that kind of lets me down because most of this album doesn\'t really strike me as being that type of music. I\'m gonna say something that may spark a lot of angry comments, but at least half of what I\'m hearing here feels very artful to me for a mainstream hip hop album. But my biggest gripe with this LP is something I mentioned earlier in the review, and that\'s how essential it is, to me, to be a fan, or at least be interested in Kanye on a personal level to enjoy this. I think even someone who hates Kanye can get into some of the storylines on this album at least a little. The position I\'m in is that I don\'t care. There\'s fantastic production here, there\'s great rhymes, but I\'m not so interested in hearing about Kanye\'s f**ked up social life so much that that I\'ll just be sitting on the edge of my seat through 8 minutes of the Blame Game or 9 minutes of Runaway. I get kind of bored! What do you want me to do? But people love the sick little details. People love dirty laundry and I can see this album appealing in a big way because of that, especially because of how expensive and impressive the music sounds. I enjoyed a lot of what I heard here, I just didn\'t like a lot of the drama that this thing served up because it just doesn\'t sound all that relevant. You guys, you were asking for this, let me know what you think of this album. Is it Kanye\'s greatest work yet? Should we even be taking context into consideration when enjoying this album? And what should I review next? Anthony Fantano, Kanye West, My Beautiful Dark Twisted Fantasy, forever."], | |
| ["It happens to most of us at an early age: the realization that life will not follow a straight line on the path towards fulfillment. Instead, life spirals. The game is rigged, power corrupts, and society is, in a word, bullshit. Art can expose the lies. The early music of Fiona Apple was so much about grand betrayals by inadequate men and the patriarchal world. Did it teach you to hate yourself? Did it teach you to bury your pain, to let it calcify, to build a gate around your heart that quiets the reaches of your one and only voice? Fetch the bolt cutters.\r\n\r\nFiona Apple’s fifth record is unbound. No music has ever sounded quite like it. Apple recorded Fetch the Bolt Cutters both in and with her Venice Beach home, banging on its walls, stomping on its ground. Self-reliance is its rule, curiosity is its key. Fetch the Bolt Cutters seems to almost completely turn the volume down on music history, while it cranks up raw, real life—handclaps, chants, and other makeshift percussion, in harmony with space, echoes, whispers, screams, breathing, jokes, so-called mistakes, and dog barks. (At least five dogs are credited: Mercy, Maddie, Leo, Little, and Alfie.) All of this debris orbits around the core of Apple’s music: her voice, her piano, and most of all her words, which have always been her primary instrument. It creates a wild symphony of the everyday."], | |
| ["Greta Van Fleet sound like they did weed exactly once, called the cops, and tried to record a Led Zeppelin album before they arrested themselves. The poor kids from Frankenmuth, Michigan don’t even realize they’re more of an algorithmic fever dream than an actual rock band. While they’re selling out shows all over the world, somewhere in a boardroom, a half-dozen people are figuring out just how, exactly, Jimmy Page and Robert Plant are supposed to fit into the SUV with the rest of the Greta Van Fleet boys on “Carpool Karaoke.”\r\n\r\nJust look at this photo: Brothers Jake and Sam Kiszka, on guitar and bass, are both wearing hippie costumes they 3D-printed off the internet. The singer, the wretched and caterwauling third brother, Josh, is in dangly feather earrings and vinyl pants, like he was dressed by a problematic Santa Fe palm-reader with a gift certificate to Chico’s. It’s a costume—Greta Van Fleet is all costume. And if things that look like another thing is your thing, get ready to throw your lighters up for a band whose guiding principle seems to be reading the worst Grand Funk Railroad songs as if they were a religious text."], | |
| ] | |
| ) | |
| iface.launch() | |