-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathui.R
More file actions
43 lines (31 loc) · 1.68 KB
/
ui.R
File metadata and controls
43 lines (31 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
shinyUI(fluidPage(
#create title panel
titlePanel("Next Word Prediction"),
h4('This webapp enables the user to eneter a string and predict next word that will follow the last word of the string'),
h4('The prediction is based sample data from the Coursera files. Please allow 45 seconds for the app to load.'),
h4('The app shows various predictions based on different n-gram models used'),
helpText(HTML("<a href = \"https://github.com/bimehta/Capstone_SwiftKey/blob/master/README.md\">Detailed Documentation</a>")),
textInput("text", label = h3("Text input"), value = "Enter the string and click the below button..."),
submitButton('Predict next Word'),
hr(),
fluidRow(
column(3,
h4("The cleaned text for which prediction was made"),
verbatimTextOutput("value")
),
column(4, offset = 1,
h4("Best Next Single Word Predicted"),
verbatimTextOutput("best")
)
),
h3("Results of Prediction"),
h4("Based on the data enetered, 1 gram predicted the next word(s) as:"),
verbatimTextOutput("onegram"),
h4("Based on the data enetered, 2 gram predicted the next word(s) as:"),
verbatimTextOutput("twogram"),
h4("Based on the data enetered, 3 gram predicted the next word(s) as:"),
verbatimTextOutput("threegram"),
h4("Based on the data enetered, 4 gram predicted the next word(s) as:"),
verbatimTextOutput("fourgram")
)
)