I have created a text prediction app that displays 10 sentences based on the word searched in the toolbar. However, all the sentences are being displayed in a single toolbar horizontally. I would like the sentences to appear sequentially i.e. vertically, one after another
ui<- shinyUI(fluidPage(
# Application title
mainPanel(
img(src='image.jpg', align = "right"),
#titlePanel(title=div(img(src="spsimage.jpg"))),
fluidRow(HTML("<strong> Search Bar")),
#fluidRow(HTML(" <strong>Date: 06-29-2020</strong>") ),
fluidRow(
br(),
p("Text predictior app ")),
br(),
br(),
fluidRow(HTML("<strong>Enter a word. Press \"Next words\" button to predict the following words</strong>") ),
fluidRow( p("\n") ),
# Sidebar layout
sidebarLayout(
sidebarPanel(
textInput("inputString", "Enter a word here",value = " "),
submitButton("Next words")
),
mainPanel(
h4("Predicted Next Word"),
verbatimTextOutput("prediction"),
textOutput('text1'),
)
)
)))
server <- function(input, output, session) {
sentences <- reactive({
make_sentences(input$inputString)
})
output$prediction <- renderText({ sentences() })
}
the output is coming as - Angry look for some time for Angry glance, and the duc d’enghien Angry look was a tone or Angry tears. “Lise!” Was that? The Angry tears. “Lise!” Said princess anna Angry look as much as she Angry look for three of the Angry tears. “Lise!” Said to the Angry look fixed on with an Angry glance, and fireworks are not
I would prefer -
1- Angry look for some time for
2- Angry glance, and the duc d’enghien
3- Angry look was a tone or Angry tears. “Lise!” Was that?
4-The Angry tears. “Lise!” Said princess anna
5-Angry look as much as she
'''''