Kadigas commited on
Commit
020dc49
·
1 Parent(s): fd0249a

fix: point to new url

Browse files
__pycache__/main.cpython-310.pyc CHANGED
Binary files a/__pycache__/main.cpython-310.pyc and b/__pycache__/main.cpython-310.pyc differ
 
templates/index.html CHANGED
@@ -8,66 +8,129 @@
8
  <title>Aplikasi Prediksi Biaya Asuransi</title>
9
  </head>
10
 
11
- <body class="flex flex-col justify-between item-center p-8 min-h-screen bg-gradient-to-r from-purple-400 to-purple-700 text-gray-800 md:flex-row">
12
- <main class="bg-white p-16 rounded-lg">
13
- <h1 class="text-3xl font-bold mb-8">Prediksi Biaya Asuransi Anda:</h1>
 
 
14
 
15
- <form action="https://alproits-cyberdas-lr.hf.space/predict" method="post" enctype="multipart/form-data" class="flex flex-col">
16
- <label for="age" class="mb-2">Usia</label>
17
- <input type="text" name="age" placeholder="Usia" required="required" class="p-4 bg-gray-100 rounded-md" />
18
-
19
- <label for="sex" class="mt-4 mb-2">Jenis Kelamin:</label>
20
- <select name="sex" id="sex" class="p-4 bg-gray-100 rounded-md">
21
- <option value="1">Laki-laki</option>
22
- <option value="0">Perempuan</option>
23
- </select>
24
-
25
- <label for="smoker" class="mt-4 mb-2">Perokok:</label>
26
- <select name="smoker" id="smoker" class="p-4 bg-gray-100 rounded-md">
27
- <option value="1">Ya</option>
28
- <option value="0">Tidak</option>
29
- </select>
30
-
31
- <label for="bmi" class="mt-4 mb-2">BMI:</label>
32
- <input type="text" name="bmi" placeholder="BMI" required="required" class="p-4 bg-gray-100 rounded-md" />
33
-
34
- <label for="children" class="mt-4 mb-2">Jumlah Anak:</label>
35
- <input type="text" name="children" placeholder="Jumlah Anak" required="required" class="p-4 bg-gray-100 rounded-md" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- <label for="region" class="mt-4 mb-2">Region:</label>
38
- <select name="region" id="region" class="p-4 bg-gray-100 rounded-md">
39
- <option value="3">Southwest</option>
40
- <option value="2">Southeast</option>
41
- <option value="1">Northwest</option>
42
- <option value="0">Northeast</option>
43
- </select>
44
 
45
- <button type="submit" class="flex justify-center align-center mt-8 p-4 bg-gradient-to-r from-purple-400 to-purple-700 text-white rounded-md">
46
- PREDIKSI SEKARANG<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right ml-4">
47
- <line x1="5" y1="12" x2="19" y2="12"></line>
48
- <polyline points="12 5 19 12 12 19"></polyline>
49
- </svg>
50
- </button>
51
- </form>
52
- </main>
53
- <section class="mt-8 h-full flex-auto rounded-lg md:mt-0 md:ml-8">
54
- <div class="bg-white p-16 rounded-lg">
55
- <h1 class="text-2xl mb-8">Estimasi biaya asuransi Anda adalah</h1>
56
- <h2 class="text-5xl font-bold">${{ '{:,.2f}'.format(insurance_cost) }}</h2>
57
- {% if insurance_cost != 0 %}
58
- <div class="mt-8">
59
- <p><strong>Usia:</strong> {{ age }} tahun</p>
60
- <p><strong>Jenis kelamin:</strong> {{ sex }}</p>
61
- <p><strong>Status perokok:</strong> {{ smoker }}</p>
62
- <p><strong>BMI:</strong> {{ bmi }}</p>
63
- <p><strong>Jumlah Anak:</strong> {{ children }}</p>
64
- <p><strong>Region:</strong> {{ region }}</p>
65
  </div>
66
- {% endif %}
67
- </div>
68
- <div class="flex justify-around p-16 rounded-lg mt-8">
69
- <img class="h-24 md:h-28" src="https://elib.its.ac.id/conf/cyberdas/public/assets/img/img_navbar.svg" alt="logo-dts" />
70
- </div>
71
- </section>
 
 
 
 
 
 
 
 
 
72
  </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  </html>
 
8
  <title>Aplikasi Prediksi Biaya Asuransi</title>
9
  </head>
10
 
11
+ <body>
12
+ <div class="bg-black text-white flex flex-row justify-end py-1">
13
+ <button class="mx-8 font-bold tablink active rounded-2xl p-2 hover:bg-purple-500 duration-150" onclick="openModel(event, 'Model1')">Model 1</button>
14
+ <button class="mx-8 font-bold tablink rounded-2xl p-2 hover:bg-purple-500 duration-150" onclick="openModel(event, 'Model2')">Model 2</button>
15
+ </div>
16
 
17
+ <div id="Model1" class="Model bg-gradient-to-r from-purple-400 to-purple-700 text-gray-800">
18
+ <section class="flex flex-col justify-between item-center p-8 min-h-screen md:flex-row">
19
+ <main class="bg-white p-16 rounded-lg">
20
+ <h1 class="text-3xl font-bold mb-8">Prediksi Biaya Asuransi Anda:</h1>
21
+
22
+ <form action="https://alproits-cyberdas-lr.hf.space/predict" method="post" enctype="multipart/form-data" class="flex flex-col">
23
+ <label for="age" class="mb-2">Usia</label>
24
+ <input type="text" name="age" placeholder="Usia" required="required" class="p-4 bg-gray-100 rounded-md" />
25
+
26
+ <label for="sex" class="mt-4 mb-2">Jenis Kelamin:</label>
27
+ <select name="sex" id="sex" class="p-4 bg-gray-100 rounded-md">
28
+ <option value="1">Laki-laki</option>
29
+ <option value="0">Perempuan</option>
30
+ </select>
31
+
32
+ <label for="smoker" class="mt-4 mb-2">Perokok:</label>
33
+ <select name="smoker" id="smoker" class="p-4 bg-gray-100 rounded-md">
34
+ <option value="1">Ya</option>
35
+ <option value="0">Tidak</option>
36
+ </select>
37
+
38
+ <label for="bmi" class="mt-4 mb-2">BMI:</label>
39
+ <input type="text" name="bmi" placeholder="BMI" required="required" class="p-4 bg-gray-100 rounded-md" />
40
+
41
+ <label for="children" class="mt-4 mb-2">Jumlah Anak:</label>
42
+ <input type="text" name="children" placeholder="Jumlah Anak" required="required" class="p-4 bg-gray-100 rounded-md" />
43
+
44
+ <label for="region" class="mt-4 mb-2">Region:</label>
45
+ <select name="region" id="region" class="p-4 bg-gray-100 rounded-md">
46
+ <option value="3">Southwest</option>
47
+ <option value="2">Southeast</option>
48
+ <option value="1">Northwest</option>
49
+ <option value="0">Northeast</option>
50
+ </select>
51
+
52
+ <button type="submit" class="flex justify-center align-center mt-8 p-4 bg-gradient-to-r from-purple-400 to-purple-700 text-white rounded-md">
53
+ PREDIKSI SEKARANG<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right ml-4">
54
+ <line x1="5" y1="12" x2="19" y2="12"></line>
55
+ <polyline points="12 5 19 12 12 19"></polyline>
56
+ </svg>
57
+ </button>
58
+ </form>
59
+ </main>
60
+ <section class="mt-8 h-full flex-auto rounded-lg md:mt-0 md:ml-8">
61
+ <div class="bg-white p-16 rounded-lg">
62
+ <h1 class="text-2xl mb-8">Estimasi biaya asuransi Anda adalah</h1>
63
+ <h2 class="text-5xl font-bold">${{ '{:,.2f}'.format(insurance_cost) }}</h2>
64
+ {% if insurance_cost != 0 %}
65
+ <div class="mt-8">
66
+ <p><strong>Usia:</strong> {{ age }} tahun</p>
67
+ <p><strong>Jenis kelamin:</strong> {{ sex }}</p>
68
+ <p><strong>Status perokok:</strong> {{ smoker }}</p>
69
+ <p><strong>BMI:</strong> {{ bmi }}</p>
70
+ <p><strong>Jumlah Anak:</strong> {{ children }}</p>
71
+ <p><strong>Region:</strong> {{ region }}</p>
72
+ </div>
73
+ {% endif %}
74
+ </div>
75
+ <div class="flex justify-around p-16 rounded-lg mt-8">
76
+ <img class="h-24 md:h-28" src="https://elib.its.ac.id/conf/cyberdas/public/assets/img/img_navbar.svg" alt="logo-dts" />
77
+ </div>
78
+ </section>
79
+ </section>
80
+ </div>
81
 
82
+ <div id="Model2" class="Model bg-gradient-to-r from-green-400 to-green-700 text-gray-800">
83
+ <section class="flex flex-col justify-between item-center p-8 min-h-screen md:flex-row">
84
+ <section class="mt-8 flex-auto rounded-lg md:mt-0 md:ml-8">
85
+ <div class="bg-white p-16 rounded-lg">
86
+ <h1 class="text-3xl font-bold mb-8">Prediksi :</h1>
87
+ <form action="https://alproits-cyberdas-lr.hf.space/predict" method="post" enctype="multipart/form-data" class="flex flex-col">
88
+ <label for="">
89
 
90
+ </label>
91
+ <button type="submit" class="flex justify-center align-center mt-8 p-4 bg-gradient-to-r from-green-400 to-green-700 text-white rounded-md">
92
+ PREDIKSI SEKARANG<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right ml-4">
93
+ <line x1="5" y1="12" x2="19" y2="12"></line>
94
+ <polyline points="12 5 19 12 12 19"></polyline>
95
+ </svg>
96
+ </button>
97
+ </form>
98
+ </div>
99
+ </section>
100
+ <section class="mt-8 h-full flex-auto rounded-lg md:mt-0 md:ml-8">
101
+ <div class="bg-white p-16 rounded-lg">
102
+ <h1 class="text-3xl font-bold mb-8"> Hasil Prediksi :</h1>
 
 
 
 
 
 
 
103
  </div>
104
+ <div class="flex justify-around p-16 rounded-lg mt-8">
105
+ <img class="h-24 md:h-28" src="https://elib.its.ac.id/conf/cyberdas/public/assets/img/img_navbar.svg" alt="logo-dts" />
106
+ </div>
107
+ </section>
108
+ </section>
109
+ </div>
110
+
111
+ <style>
112
+ .active {
113
+ background-color: rgb(124 58 237);
114
+ }
115
+ #Model2 {
116
+ display: none;
117
+ }
118
+ </style>
119
  </body>
120
+
121
+ <script>
122
+ function openModel(evt, modelName) {
123
+ var i, x, tablinks;
124
+ x = document.getElementsByClassName("Model");
125
+ for (i = 0; i < x.length; i++) {
126
+ x[i].style.display = "none";
127
+ }
128
+ tablinks = document.getElementsByClassName("tablink");
129
+ for (i = 0; i < x.length; i++) {
130
+ tablinks[i].className = tablinks[i].className.replace(" active", "");
131
+ }
132
+ document.getElementById(modelName).style.display = "block";
133
+ evt.currentTarget.className += " active";
134
+ }
135
+ </script>
136
  </html>