-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
31 lines (26 loc) · 1018 Bytes
/
ui.R
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
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
shinyUI(fluidPage(
titlePanel("Web Cloud"),
sidebarLayout(
sidebarPanel(
h3('Text import'),
textInput(inputId='input_url',label='Enter url:',value = 'http://www.ted.com/talks/sam_harris_can_we_build_ai_without_losing_control_over_it/transcript?language=en'),
textInput(inputId='input_css',label='CSS selector:',value='.talk-transcript__para__text'),
actionButton(inputId='button_scrape',label = 'Scrape Web Page'),
textOutput('scrape_results'),
h3('Text analysis'),
numericInput('input_min_ngram','Min Ngrams:',value=1,min=1),
numericInput('input_ngram','Max Ngrams:',value=3,min=1),
numericInput('input_minwords','Minimum frequency:',value=3,min=1),
textOutput('analysis_results')
),
mainPanel(
shiny::plotOutput('wordcloud')
)
)
))