Please help out shiny deployment
emotion_score <- reactive({
# emotion_df <- emotion_df_final %>% filter(topic == input$topic_selector)
# x <- as.data.frame(colSums(emotion_df[,1:10]))
# x <- data.frame(names = row.names(x), x)
# names(x) <- c("emotion", "score")
# x[1:8,]
progress <- shiny::Progress$new()
progress$set(message = "Getting Emotions", value = 0.2)
on.exit(progress$close())
x <- data.frame(tweet_nbr = 1:length(cleaned_tweets()), clean_tweet = cleaned_tweets())
x$clean_tweet <- as.character(x$clean_tweet)
df <- x %>% unnest_tokens(output = word, input = clean_tweet, token = "words")
df <- df %>% inner_join(get_sentiments("nrc"))
progress$set(value = 0.8, detail = paste("Collating.."))
df <- df %>% group_by(sentiment) %>% summarise(score = n())
names(df) <- c("emotion", "score")
df[c(1:5,8:10),]
})