我创建了一个文本预测应用程序,它根据工具栏中搜索的单词显示 10 个句子。但是,所有句子都水平显示在一个工具栏中。我希望句子顺序出现,即垂直,一个接一个
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() })
}
输出是 - Angry look for some time for Angry glance,而 duc d'enghien Angry look 是一种语气或愤怒的眼泪。“丽丝!” 是吗?愤怒的眼泪。“丽丝!” 说安娜公主愤怒的样子,就像她愤怒的样子一样,寻找三颗愤怒的眼泪。“丽丝!” 对着怒目而视的说着怒目而视,而烟花却不是
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
'''''