91 lines
3.5 KiB
HTML
91 lines
3.5 KiB
HTML
<!-- Navigation -->
|
|
{% extends "base.html" %}
|
|
|
|
{% block title %}Input Sentimen{% endblock %}
|
|
<!-- Page Content -->
|
|
{% block content %}
|
|
|
|
<style>
|
|
.table {
|
|
font-size: 10px;
|
|
height: 200px;
|
|
}
|
|
</style>
|
|
|
|
<main class="container" role="main">
|
|
|
|
<!-- <div class="container"> -->
|
|
<h3 class="card card-body text-center mt-5">ANALISIS SENTIMEN TERHADAP BEA CUKAI PADA MEDIA SOSIAL TWITTER MENGGUNAKAN METODE NAÏVE BAYES</h3>
|
|
<div class="card card-body">
|
|
<!-- <h3 class="mt-5">Analisis Sentimen pengguna Layanan Provider Seluler pada Masa Pandemi menggunakan metode Naive Bayes</h3> -->
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<form action="/sentimen" method="POST" id="sentimen">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<div>
|
|
<label for="name">Input Sentimen..</label>
|
|
</div>
|
|
<div class="form-group shadow-textarea">
|
|
<textarea class="form-control z-depth-1" id="input_sentimen" name="sentimen" rows="3" cols="50" required="required" placeholder="Masukkan Sentimen disini..." required></textarea>
|
|
<!-- <input type="text" id="input_sentimen" name="sentimen" placeholder="Sentimen" required> -->
|
|
</div>
|
|
<div class="form-group">
|
|
<button class="btn btn-primary btn-block" type="submit" value="Submit">Prediksi</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="results col-lg-6" style="margin-top: 2rem;">
|
|
{% if sentimen %}
|
|
<div class="alert alert-primary" role="alert">
|
|
Input: {{ sentimen }}
|
|
</div>
|
|
{% elif sentimen == False %}
|
|
<div class="alert alert-warning" role="alert">
|
|
Input: kosong..
|
|
</div>
|
|
{% endif %}
|
|
<!-- <p>{{prediksi_nb}}</p> -->
|
|
{% if prediksi == "Negatif"%}
|
|
<div class="table table-striped table-bordered" cellspacing="0" width="100%" style="overflow-y: auto; overflow-x: auto;">
|
|
{% for score in prediksi_nb %}
|
|
{{ score|safe }}
|
|
{% endfor %}
|
|
</div>
|
|
<div class="score_probabilitas">
|
|
<p>{{ score_pos }} = Positif</p>
|
|
<p>{{ score_net }} = Netral</p>
|
|
<p>{{ score_neg }} = Negatif</p>
|
|
</div>
|
|
<h2 class="text-center" style="color:red;">"Sentimen bernilai Negatif"</h2>
|
|
{% elif prediksi == "Positif"%}
|
|
<div class="table table-striped table-bordered" cellspacing="0" width="100%" style="overflow-y: auto; overflow-x: auto;">
|
|
{% for score in prediksi_nb %}
|
|
{{ score|safe }}
|
|
{% endfor %}
|
|
</div>
|
|
<p>{{ score_pos }} = Positif</p>
|
|
<p>{{ score_net }} = Netral</p>
|
|
<p>{{ score_neg }} = Negatif</p>
|
|
<h2 class="text-center" style="color:green;"><b>"Sentimen bernilai Positif"</b></h2>
|
|
{% elif prediksi == "Netral"%}
|
|
<div class="table table-striped table-bordered" cellspacing="0" width="100%" style="overflow-y: auto; overflow-x: auto;">
|
|
{% for score in prediksi_nb %}
|
|
{{ score|safe }}
|
|
{% endfor %}
|
|
</div>
|
|
<p>{{ score_pos }} = Positif</p>
|
|
<p>{{ score_net }} = Netral</p>
|
|
<p>{{ score_neg }} = Negatif</p>
|
|
<h2 class="text-center" style="color:yellow;"><b>"Sentimen bernilai Netral"</b></h2>
|
|
{% else %}
|
|
<h2 class="text-center" style="color:lightsalmon;"><b>Sentimen tidak diketahui</b></h2>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<!-- </div> -->
|
|
</main>
|
|
<!-- /.container -->
|
|
{% endblock %}
|