Skip to content

Commit

Permalink
app update
Browse files Browse the repository at this point in the history
  • Loading branch information
mshin77 committed Feb 5, 2024
1 parent bafbfca commit 700a23e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions inst/TextAnalysisR.app/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ suppressPackageStartupMessages({

server <- shinyServer(function(input, output, session) {
observe({
if (input$dataset_choice == "SpecialEduTech") {
if (input$dataset_choice == "Upload an Example Dataset") {
shinyjs::disable("file")
} else {
shinyjs::enable("file")
}
})

mydata <- reactive({
if (input$dataset_choice == "SpecialEduTech") {
if (input$dataset_choice == "Upload an Example Dataset") {
data <- TextAnalysisR::SpecialEduTech
} else {
req(input$file)
Expand Down Expand Up @@ -331,7 +331,7 @@ server <- shinyServer(function(input, output, session) {


# 2. Step 2: Run a model and display highest word probabilities for each labeled topic

output$K_number_uiOutput <- renderUI({
sliderInput(
"K_number",
Expand Down Expand Up @@ -445,7 +445,7 @@ server <- shinyServer(function(input, output, session) {
# Display highest word probabilities for each topic

# Tidy the word-topic combinations

beta_td <- reactive({
tidytext::tidy(stm_K_number(), document_names = rownames(dfm_outcome()))
})
Expand Down Expand Up @@ -486,9 +486,9 @@ server <- shinyServer(function(input, output, session) {
topic_term_plot$topic =
factor(topic_term_plot$topic, levels = topic_term_plot$topic %>% unique())
}

topic_term_plot$tt = NULL

topic_term_plot %>%
ggplot(aes(term, beta, fill = topic)) +
geom_col(show.legend = FALSE, alpha = 0.8) +
Expand Down
2 changes: 1 addition & 1 deletion inst/TextAnalysisR.app/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ui <- fluidPage(
"dataset_choice",
"Upload a file or use the dataset",
selected = " ",
choices = c(" ", "SpecialEduTech", "Upload Your File")
choices = c(" ", "Upload an Example Dataset", "Upload Your File")

),
fileInput(
Expand Down

0 comments on commit 700a23e

Please sign in to comment.