-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.R
42 lines (28 loc) · 809 Bytes
/
server.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
32
33
34
35
36
37
38
# Define server function
server <- function(input, output) {
previsaoInput <- reactive({
previsao_f <- prever(input$texturl)
return(previsao_f)
})
previsaoInput2 <- reactive({
#previsao_f <- prever(input$texturl)
return(previsao_f)
})
output$txtout <- renderText({
if (input$submitbutton>0) {
paste(previsaoInput())}
else {
return("A rede neural está pronta para calcular as probabilidades.")
}
})
output$txtout2 <- renderText({
if (input$submitbutton2>0) {
if (is.numeric(previsaoInput2())){
paste(round(previsaoInput2(), 2), '%', '')}
else {
paste(previsaoInput2())}}
else {
return("A rede neural está pronta para calcular as probabilidades.")
}
})
}