Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
def testpage():
    value = 1
    link = getSongUrlFromValue(value)
    return render_template('testpage.html', songUrl=link)