Commit 3cc81c32 authored by Thathsarani R.P.H.S.R's avatar Thathsarani R.P.H.S.R

Merge branch 'IT20201364_Thathsarani_R.P.H.S.R'

parents 6af22692 49a3d25a
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>zenBot Conversation</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
<link rel="stylesheet" href="../static/chat.css">
<link rel="stylesheet" href="../static/style.css">
<!------ display shortcut icon ------>
<link rel = "shortcut icon" href = "../static/logo.png">
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
<script src="../static/script.js"></script>
<script src="../static/script2.js"></script>
<nav class="navbar">
<div class="container-fluid">
<!-- <a class="navbar-brand" href="#">
<img src="logo.png" alt="" width="30" height="24" class="d-inline-block align-text-top">
zenFlow
</a> -->
<img src="../static/logo.svg" alt="" width="200" height="50" style="position: relative; left: 45%;">
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" hidden>
<!-- <button class="btn btn-outline-primary" type="submit">Register</button> -->
</form>
</div>
</nav>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
<div class="container mt-5" id="cont">
<h2>Welcome to the zenBot,</h2>
{% if current_user %}
<h5>Hi, {{ current_user.username }} !</h5>
{% endif %}
</div>
<div class = "container mt-5" style=" width : 40%; justify-content: center;" id="container-1">
<br>
<center>
<img src="../static/chatbot.png" alt="bot">
<div> <h1> zenBot Emotion Level Result </h1> </div>
<br>
<!-- <button type="button" class="btn btn-outline-danger btn-lg" onclick="window.location.href='/process'">Start</button> <br> <br>
<img src="../static/mic.png" alt="mic"> </center> -->
<br>
<table class="table table-danger table-striped table-hover">
<thead>
<tr>
<th scope="col" style="text-align: center;">Emotions</th>
<!-- <th scope="col" style="text-align: center;">Precentage</th> -->
</tr>
</thead>
<tbody>
{% for emotion, percentage in emotion_percentages.items() %}
<tr>
<td style="text-align: center;">{{ emotion }}</td>
<!-- <td style="text-align: center;">{{ percentage }}%</td> -->
</tr>
{% endfor %}
</tbody>
</table>
<br>
<center> <div> <h1> zenBot Stress Level Clue </h1> </div>
<br>
<h5 style="color: crimson;">{{ statement }}</h5>
<br>
</center>
{% if current_user %}
<form method="" action="" id="reset-form">
<center> <button type="submit" class="btn btn-outline-dark btn-lg" onclick="resetCounselling()">Reset</button> </center>
</form>
{% endif %}
<br>
</div>
<br>
<!-- <div class="container mt-5" id="container-2">
<center>
<button type="button" class="btn btn-outline-danger btn-lg" onclick="window.location.href='/process'">Start Conversation</button> <br> <br>
<img src="mic.png" alt="mic">
</center>
</div> -->
<div class="container mt-5" id="conversation">
<br>
<center>
{% if current_user %}
<button type="button" class="btn btn-info" onclick="startCounselling()">Start Conversation</button> <br> <br>
{% endif %}
<img src="../static/mic.png" alt="mic">
<br>
<!-- <h3> Conversation: </h3> -->
<ul>
{% for message in conversation %}
<li>
{% if message.zenBot %}
zenBot : {{ message.zenBot }}
{% elif message.User %}
User: {{ message.User }}
{% endif %}
</li>
{% endfor %}
</ul>
</center>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Counselor</title>
<link rel="stylesheet" href="../static/style.css">
</head>
<body>
<header>
<h1>AI Counselor</h1>
</header>
<h2>Welcome to the Voice Assistant</h2>
{% if current_user %}
<p>Welcome, {{ current_user.username }}!</p>
<!-- Button to toggle "Previous Records" visibility -->
<button type="button" class="toggle-button" onclick="togglePreviousRecords()">Toggle Previous Records</button>
<div id="previous-records" class="previous-stress-level">
<h3>Previous Records</h3>
<table>
<thead>
<tr>
<th>Date</th>
<th>Time</th>
<th>Stress Level</th>
</tr>
</thead>
<tbody>
{% for stress_level in stress_levels %}
<tr>
<td>{{ stress_level.login_time.strftime('%Y-%m-%d') }}</td>
<td>{{ stress_level.login_time.strftime('%H:%M:%S') }}</td>
<td>{{ stress_level.stress_level }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- Add your content here for authenticated users -->
{% else %}
<p>Please log in to use the Voice Assistant.</p>
<a href="/login">Log In</a> | <a href="/register">Register</a>
{% endif %}
<main class="container">
{% if current_user %}
<button type="button" class="start-button" onclick="startCounselling()">Start</button>
<button type="button" class="btn btn-danger" onclick="resetCounselling()">Reset</button>
{% else %}
<p>Please log in to use the Voice Assistant.</p>
<a href="/login">Log In</a> | <a href="/register">Register</a>
{% endif %}
<div class="table-wrapper">
<p id="stress-level">Stress Level: {{ stress_level }}</p>
<table id="emotion-table">
<thead>
<tr>
<th>Emotion</th>
<th>Percentage</th>
</tr>
</thead>
<tbody>
{% for emotion, percentage in emotion_percentages.items() %}
<tr>
<td>{{ emotion }}</td>
<td>{{ percentage }}%</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- Add this block of code to display the conversation list -->
<div id="conversation">
<h3>Conversation:</h3>
<ul>
{% for message in conversation %}
<li>
{% if message.AI %}
AI: {{ message.AI }}
{% elif message.User %}
User: {{ message.User }}
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</main>
<script src="../static/script.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>zenBot Login</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
<link rel="stylesheet" href="../static/login.css">
<link rel="stylesheet" href="../static/style.css">
<script src="../static/script.js"> </script>
<!------ display shortcut icon ------>
<link rel = "shortcut icon" href = "../static/logo.png">
</head>
<body style="background-color: whitesmoke;">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
<nav class="navbar">
<div class="container-fluid">
<!-- <a class="navbar-brand" href="#">
<img src="logo.png" alt="" width="30" height="24" class="d-inline-block align-text-top">
zenFlow
</a> -->
<img src="../static/logo.svg" alt="" width="200" height="50" style="position: relative; left: 45%;">
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" hidden>
<!-- <button class="btn btn-outline-primary" type="submit">Register</button> -->
</form>
</div>
</nav>
<div class = "container mt-6" style="width:25%; background-color: #12086F; border-radius: 5%;">
<form action = "/login" method = "POST">
<center> <h1 style="font-weight: bold; color: white"> Sign in </h1> </center>
<hr style="border: 2px solid black;">
<div class="form-group">
<input type="text" name="username" id="em" class="form-control" placeholder="Enter Your Username" required>
</div>
<br>
<div class="form-group">
<input type = "password" class = "form-control" id = "pwd" name = "password" placeholder = "Enter Your Password" required>
</div>
<br>
<center> <button type="submit" class="btn btn-primary" style="background-color: #0b0b45; width: 100%;"> Sign in </button> </center>
<br>
<center> <h6 style="color: white;"> If You don't Have an Account. Please Contact Administrator. </h6> </center>
</form>
</div>
<div class="container mt-5" id="cover">
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<link rel="stylesheet" href="../static/style.css">
<script src="../static/script.js"> </script>
</head>
<body>
<h2>Login</h2>
<form method="POST" action="/login">
<label for="username">Username:</label>
<input type="text" name="username" required><br>
<label for="password">Password:</label>
<input type="password" name="password" required><br>
<button type="submit">Login</button>
</form>
<p>Don't have an account? <a href="/register">Register here</a></p>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class="flash-messages">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>zenBot Conversation</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
<!------ display shortcut icon ------>
<link rel = "shortcut icon" href = "../static/logo.png">
<style>
.navbar {
background-color: #0b0b45;
}
.container {
border-radius: 10px;
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body style="background-image: url(../static/);">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
<nav class="navbar">
<div class="container-fluid">
<!-- <a class="navbar-brand" href="#">
<img src="logo.png" alt="" width="30" height="24" class="d-inline-block align-text-top">
zenFlow
</a> -->
<img src="../static/logo.svg" alt="" width="200" height="50" style="position: relative; left: 45%;">
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" hidden>
<!-- <button class="btn btn-outline-primary" type="submit">Register</button> -->
</form>
</div>
</nav>
<div class="container mt-5" style="background-color: white; width : 50%; justify-content: center;">
<br>
<form action="/register" method="post"></form>
<center> <h3 style="color: #0b0b45;">Create Account for zenBot</h3> </center>
<hr style="border: 2px #0b0b45 solid;">
<br>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label"> <b> Username </b> </label>
<input type="text" class="form-control" id="exampleFormControlInput1" placeholder="Enter User's Username" required>
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label"> <b> Password </b> </label>
<input type="password" class="form-control" id="exampleFormControlInput1" placeholder="Enter Password for User" required>
</div>
<br>
<div class="d-grid gap-2 d-md-block" style="float: right;">
<button class="btn btn-success" type="reset">Reset</button>
<button class="btn btn-primary" type="submit">Submit</button>
</div>
<br>
<br>
</form>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register</title>
<link rel="stylesheet" href="../static/style.css">
<script src="../static/script.js"> </script>
</head>
<body>
<h2>Register</h2>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class="flash-messages">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<form method="POST" action="/register">
<label for="username">Username:</label>
<input type="text" name="username" required><br>
<label for="password">Password:</label>
<input type="password" name="password" required><br>
<button type="submit">Register</button>
</form>
<p>Already have an account? <a href="/login">Login here</a></p>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>zenBot Conversation</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
<link rel="stylesheet" href="chat.css">
<!------ display shortcut icon ------>
<link rel = "shortcut icon" href = "../static/logo.png">
<style>
.navbar {
background-color: #0b0b45;
}
.container {
border-radius: 10px;
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body style="background-image: url(../static/lgbg.jpg);">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
<nav class="navbar">
<div class="container-fluid">
<!-- <a class="navbar-brand" href="#">
<img src="logo.png" alt="" width="30" height="24" class="d-inline-block align-text-top">
zenFlow
</a> -->
<img src="../static/logo.svg" alt="" width="100" height="50" style="position: relative; left: 45%;">
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" hidden>
<!-- <button class="btn btn-outline-primary" type="submit">Register</button> -->
</form>
</div>
</nav>
<div class="container mt-5" style="background-color: white; width : 50%; justify-content: center;">
<br>
<center> <h3 style="color: #0b0b45;">Request Access for zenBot</h3> </center>
<hr style="border: 2px #0b0b45 solid;">
<br>
<p> Please fill all the mandatory information <span style="color:#ff0000">*</span> </p>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label"> <b> Username </b> <span style="color:#ff0000">*</span> </label>
<input type="text" class="form-control" id="exampleFormControlInput1" placeholder="Enter Your Username" required>
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label"><b> Email Address </b> <span style="color:#ff0000">*</span> </label>
<input type="email" class="form-control" id="exampleFormControlInput1" placeholder="Enter Your Email Address" pattern="[a-zA-Z0-9.%+-]*{8}" required>
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label"><b> Description </b></label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
</div>
<br>
<div class="d-grid gap-2 d-md-block" style="float: right;">
<button class="btn btn-success" type="submit">Reset</button>
<button class="btn btn-primary" type="reset">Submit</button>
</div>
<br>
<br>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>zenBot Conversation</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
<link rel="stylesheet" href="../static/style.css">
<script src="../static/script.js"></script>
<script src="../static/script2.js"></script>
<!------ display shortcut icon ------>
<link rel="shortcut icon" href="../static/logo.png">
<style>
.navbar {
background-color: #0b0b45;
}
.container {
border-radius: 10px;
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
}
.card {
text-align: center;
}
/* Define styles for text color */
.text-danger {
color: red;
}
.text-warning {
color: yellow;
}
</style>
</head>
<body style="background-color: whitesmoke;">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
<nav class="navbar">
<div class="container-fluid">
<img src="../static/logo.svg" alt="" width="200" height="50" style="position: relative; left: 45%;">
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" hidden>
</form>
</div>
</nav>
<center>
<div class="container-mt-5">
<br> <br>
<!-- Button to toggle "Previous Records" visibility -->
<button type="button" class="toggle-button" onclick="togglePreviousRecords()">Toggle Previous stresses</button>
<br> <br>
<div id="previous-records" class="previous-stress-level">
<h3>Stress Level Records</h3>
<div class="card-dev">
<div class="row">
{% for stress_level in stress_levels %}
<div class="col-md-4">
<div class="card mb-3 pt-3 pb-4 bg-info text-dark border border-danger">
<p class="fw-bold tex-dark">
{{ stress_level.user_id }}
</p>
<p>
{{ stress_level.login_time.strftime('%Y-%m-%d') }}
</p>
<p>
{{ stress_level.login_time.strftime('%H:%M:%S') }}
</p>
<!-- Conditional text color based on stress_level -->
<p class="fw-bold" style="color: {% if stress_level.stress_level == 'High Stress' %}red{% else %}black{% endif %}">
{{ stress_level.stress_level }}
</p>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</center>
</body>
</html>
<!-- user_details.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../static/style.css">
<title>User Details</title>
</head>
<body>
<h1>User Details</h1>
<p>Username: {{ user.username }}</p>
<!-- Display other user details as needed -->
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment