def beats(): text = request.args['text'] if link_or_nah(text): text = to_text(text) else: text = text sentiment = float(determineSubject(text)) return render_template('beats.html', soundtype="beat", sentiment = sentiment)
def music(): text = request.args['text'] if link_or_nah(text): text = to_text(text) else: text = text sentiment = float(determineSubject(text)) value = getSentValue(sentiment) songUrl = getSongUrlFromValue(sentiment) return render_template('music.html', text=text, sentiment = sentiment, songUrl=songUrl, value=value)
def music(): text = request.args['text'] soundtype = request.args['soundtype'] print("soundtype: " + request.args['soundtype']) # if text is a link call mains if link_or_nah(text): text = to_text(text) else: text = text sentiment = float(determineSubject(text)) value = getSentValue(sentiment) songUrl = getSongUrlFromValue(sentiment) return render_template('music.html', text=text, sentiment = sentiment, songUrl=songUrl, value=value, soundtype=soundtype)