Shiny app for predicting words - UI code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is the user-interface definition the word-predictor application. You can | |
# run the application by clicking 'Run App' above. | |
# | |
# Find out more about building applications with Shiny here: | |
# | |
# http://shiny.rstudio.com/ | |
# | |
library(shiny) | |
# Define UI for application | |
shinyUI(fluidPage( | |
# Application title | |
titlePanel("Word Predictor"), | |
# Horizontal rule | |
hr(), | |
# Sidebar with a slider input for number of bins | |
sidebarLayout( | |
sidebarPanel( | |
# The input field | |
textInput("ngram", "Enter a n-gram:") | |
), | |
# Show a plot of the possible predicted words | |
mainPanel( | |
# The predicted word | |
uiOutput("next_word"), | |
# The predicted word probability | |
uiOutput("word_prob"), | |
# Horizontal rule | |
hr(), | |
# The bar plot of possible next words | |
plotOutput("next_word_plot") | |
) | |
) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment