Commit 5b823906 authored by NilkiRatnayake's avatar NilkiRatnayake

Final

parent f3b53d0d
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app.py",
"FLASK_DEBUG": "1"
},
"args": [
"run",
"--no-debugger",
"--no-reload",
"--port=8041"
],
"jinja": true,
"justMyCode": true
}
]
}
\ No newline at end of file
{
"cSpell.words": [
"streamlit"
"csvfile",
"csvreader",
"dbchat",
"dialogflow",
"fetchmsg",
"joblib",
"jsonify",
"pymongo",
"sklearn",
"streamlit",
"webhookresponse"
]
}
\ No newline at end of file
This diff is collapsed.
import streamlit as st
from disease_page import show_disease_page
from treatment_page import show_treatment_page
from clinics_page import show_clinics_page
from pharmacies_page import show_pharmacies_page
from flask_socketio import SocketIO
from flask import Flask, render_template, request, redirect, url_for, session, make_response
from flask_cors import cross_origin, CORS
from flask_bcrypt import Bcrypt
from pymongo import MongoClient
from numpy import array
from json import dumps
from os import environ
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from flask import Flask, request, jsonify
from sklearn.preprocessing import MultiLabelBinarizer
page = st.sidebar.selectbox("Features", ("Disease", "Treatment", "Clinics", "Pharmacies"))
app = Flask(__name__)
app.secret_key = '09cd6cb8206a12b54a7ddb28566be757'
socketio = SocketIO(app, cors_allowed_origins="*")
bcrypt = Bcrypt(app)
if page == "Disease":
show_disease_page()
cluster = MongoClient(
"mongodb://localhost:27017/")
db = cluster['TrustyPet']
db = cluster['TrustyPet']
fields = []
description = {}
@app.route("/", methods=['GET'])
def home():
return render_template('index.html')
@app.route('/bot')
@cross_origin()
def chat_bot():
if "email" in session:
return render_template('bot.html')
else:
return redirect(url_for('login', next='/bot'))
@app.route('/signup', methods=['POST'])
@cross_origin()
def sign_up():
collection = db['users']
form_data = request.form
pw_hash = bcrypt.generate_password_hash(form_data['password']).decode('utf-8')
result = collection.find_one({'email': form_data['email']})
if result == None:
id = collection.insert_one({
'name': form_data['name'],
'email': form_data['email'],
'password': pw_hash
}).inserted_id
response = ''
if id == '':
response = 'failed'
else:
response = 'success'
else:
response = 'failed'
return render_template('signup.html', response=response)
@app.route('/login', methods=['GET', 'POST'])
@cross_origin()
def login():
if request.method == 'POST':
collection = db['users']
form_data = request.form
next_url = request.form.get('next')
query_data = {
"email": form_data['email']
}
result = collection.find_one(query_data)
response = ''
if result == None:
response = 'failed'
else:
pw = form_data['password']
if bcrypt.check_password_hash(result['password'], pw) == True:
response = 'succeeded'
session['email'] = form_data['email']
session['name'] = result['name']
else:
response = 'failed'
if response == 'failed':
return render_template('login.html', response=response)
else:
if next_url:
return redirect(next_url)
else:
return redirect(url_for('chat_bot'))
else:
if "email" in session:
return redirect(url_for("chat_bot"))
else:
return render_template('login.html')
@app.route('/dashboard')
@cross_origin()
def dashboard():
if "email" in session:
return render_template('dashboard.html')
else:
return redirect(url_for('login'))
@app.route('/logout')
@cross_origin()
def logout():
if 'email' in session:
session.pop("email", None)
session.pop("username", None)
return redirect(url_for('home'))
else:
return redirect(url_for('home'))
@app.route('/bot',methods=['POST'])
@cross_origin()
def bot():
# Load the dataset
data = pd.read_csv('medical_data.csv')
symptom_features = list(set(data[['Symptom1', 'Symptom2', 'Symptom3', 'Symptom4', 'Symptom5', 'Symptom6', 'Symptom7', 'Symptom8', 'Symptom9', 'Symptom10', 'Symptom11', 'Symptom12', 'Symptom13', 'Symptom14', 'Symptom15', 'Symptom16', 'Symptom17', 'Symptom18', 'Symptom19', 'Symptom20', 'Symptom21', 'Symptom22', 'Symptom23', 'Symptom24', 'Symptom25', 'Symptom26', 'Symptom27', 'Symptom28', 'Symptom29', 'Symptom30', 'Symptom31', 'Symptom32', 'Symptom33', 'Symptom34', 'Symptom35', 'Symptom36', 'Symptom37', 'Symptom38', 'Symptom39', 'Symptom40', 'Symptom41', 'Symptom42', 'Symptom43', 'Symptom44', 'Symptom45', 'Symptom46', 'Symptom47', 'Symptom48', 'Symptom49', 'Symptom50', 'Symptom51', 'Symptom52']].values.ravel()))
# Convert the Symptoms column to a list of lists for one-hot encoding
data[['Symptom1', 'Symptom2', 'Symptom3', 'Symptom4', 'Symptom5', 'Symptom6', 'Symptom7', 'Symptom8', 'Symptom9', 'Symptom10', 'Symptom11', 'Symptom12', 'Symptom13', 'Symptom14', 'Symptom15', 'Symptom16', 'Symptom17', 'Symptom18', 'Symptom19', 'Symptom20', 'Symptom21', 'Symptom22', 'Symptom23', 'Symptom24', 'Symptom25', 'Symptom26', 'Symptom27', 'Symptom28', 'Symptom29', 'Symptom30', 'Symptom31', 'Symptom32', 'Symptom33', 'Symptom34', 'Symptom35', 'Symptom36', 'Symptom37', 'Symptom38', 'Symptom39', 'Symptom40', 'Symptom41', 'Symptom42', 'Symptom43', 'Symptom44', 'Symptom45', 'Symptom46', 'Symptom47', 'Symptom48', 'Symptom49', 'Symptom50', 'Symptom51', 'Symptom52']] = data[['Symptom1', 'Symptom2', 'Symptom3', 'Symptom4', 'Symptom5', 'Symptom6', 'Symptom7', 'Symptom8', 'Symptom9', 'Symptom10', 'Symptom11', 'Symptom12', 'Symptom13', 'Symptom14', 'Symptom15', 'Symptom16', 'Symptom17', 'Symptom18', 'Symptom19', 'Symptom20', 'Symptom21', 'Symptom22', 'Symptom23', 'Symptom24', 'Symptom25', 'Symptom26', 'Symptom27', 'Symptom28', 'Symptom29', 'Symptom30', 'Symptom31', 'Symptom32', 'Symptom33', 'Symptom34', 'Symptom35', 'Symptom36', 'Symptom37', 'Symptom38', 'Symptom39', 'Symptom40', 'Symptom41', 'Symptom42', 'Symptom43', 'Symptom44', 'Symptom45', 'Symptom46', 'Symptom47', 'Symptom48', 'Symptom49', 'Symptom50', 'Symptom51', 'Symptom52']].apply(lambda x: x.str.split(','))
# Flatten the symptom lists
data[['Symptom1', 'Symptom2', 'Symptom3', 'Symptom4', 'Symptom5', 'Symptom6', 'Symptom7', 'Symptom8', 'Symptom9', 'Symptom10', 'Symptom11', 'Symptom12', 'Symptom13', 'Symptom14', 'Symptom15', 'Symptom16', 'Symptom17', 'Symptom18', 'Symptom19', 'Symptom20', 'Symptom21', 'Symptom22', 'Symptom23', 'Symptom24', 'Symptom25', 'Symptom26', 'Symptom27', 'Symptom28', 'Symptom29', 'Symptom30', 'Symptom31', 'Symptom32', 'Symptom33', 'Symptom34', 'Symptom35', 'Symptom36', 'Symptom37', 'Symptom38', 'Symptom39', 'Symptom40', 'Symptom41', 'Symptom42', 'Symptom43', 'Symptom44', 'Symptom45', 'Symptom46', 'Symptom47', 'Symptom48', 'Symptom49', 'Symptom50', 'Symptom51', 'Symptom52']] = data[['Symptom1', 'Symptom2', 'Symptom3', 'Symptom4', 'Symptom5', 'Symptom6', 'Symptom7', 'Symptom8', 'Symptom9', 'Symptom10', 'Symptom11', 'Symptom12', 'Symptom13', 'Symptom14', 'Symptom15', 'Symptom16', 'Symptom17', 'Symptom18', 'Symptom19', 'Symptom20', 'Symptom21', 'Symptom22', 'Symptom23', 'Symptom24', 'Symptom25', 'Symptom26', 'Symptom27', 'Symptom28', 'Symptom29', 'Symptom30', 'Symptom31', 'Symptom32', 'Symptom33', 'Symptom34', 'Symptom35', 'Symptom36', 'Symptom37', 'Symptom38', 'Symptom39', 'Symptom40', 'Symptom41', 'Symptom42', 'Symptom43', 'Symptom44', 'Symptom45', 'Symptom46', 'Symptom47', 'Symptom48', 'Symptom49', 'Symptom50', 'Symptom51', 'Symptom52']].apply(lambda x: [item for sublist in x for item in sublist])
symptoms = data[['Symptom1', 'Symptom2', 'Symptom3', 'Symptom4', 'Symptom5', 'Symptom6', 'Symptom7', 'Symptom8', 'Symptom9', 'Symptom10', 'Symptom11', 'Symptom12', 'Symptom13', 'Symptom14', 'Symptom15', 'Symptom16', 'Symptom17', 'Symptom18', 'Symptom19', 'Symptom20', 'Symptom21', 'Symptom22', 'Symptom23', 'Symptom24', 'Symptom25', 'Symptom26', 'Symptom27', 'Symptom28', 'Symptom29', 'Symptom30', 'Symptom31', 'Symptom32', 'Symptom33', 'Symptom34', 'Symptom35', 'Symptom36', 'Symptom37', 'Symptom38', 'Symptom39', 'Symptom40', 'Symptom41', 'Symptom42', 'Symptom43', 'Symptom44', 'Symptom45', 'Symptom46', 'Symptom47', 'Symptom48', 'Symptom49', 'Symptom50', 'Symptom51', 'Symptom52']].values.tolist()
# Initialize a MultiLabelBinarizer for one-hot encoding
mlb = MultiLabelBinarizer(classes=symptom_features)
mlb.fit(symptoms)
symptoms_encoded = mlb.transform(symptoms)
# One-hot encoded symptoms
X = pd.DataFrame(symptoms_encoded, columns=mlb.classes_)
y = data['Disease']
# Split the data into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
if page == "Treatment":
show_treatment_page()
# Create a decision tree classifier
classifier = DecisionTreeClassifier()
classifier.fit(X_train, y_train)
#Handling User Input
user_data = request.json
symptoms_input = user_data.get('symptoms', "").split(',')
print(user_data)
if page == "Clinics":
show_clinics_page()
if page == "Pharmacies":
show_pharmacies_page()
\ No newline at end of file
# Encoding the user's symptoms using the same MultiLabelBinarizer
user_symptoms_encoded = mlb.transform([symptoms_input])
# One-hot encoded symptoms for prediction
user_input = pd.DataFrame([list(user_symptoms_encoded[0])])
# Predicting the disease using the trained model
predicted_disease = classifier.predict(user_input)
print(predicted_disease)
return jsonify({'predicted_disease': predicted_disease[0]})
#checks if the Python script is being run directly
if __name__ == '__main__':
app.run(debug=True)
import streamlit as st
import pickle
import numpy as np
def show_clinics_page():
st.title("Vet Clinics To Treat Animal Diseases")
import streamlit as st
import pickle
import numpy as np
def show_disease_page():
st.title("Animal Disease Prediction")
st.write("""Provide symptoms to predict the disease""")
animal = (
"Cat",
"Dog",
)
symptom_1 = (
"Fever",
"Pain",
"Hair Loss",
"Shivering",
"Lack of Energy",
)
symptom_2 = (
"Fever",
"Pain",
"Hair Loss",
"Shivering",
"Lack of Energy",
)
symptom_3 = (
"Fever",
"Pain",
"Hair Loss",
"Shivering",
"Lack of Energy",
)
symptom_4 = (
"Fever",
"Pain",
"Hair Loss",
"Shivering",
"Lack of Energy",
)
symptom_5 = (
"Fever",
"Pain",
"Hair Loss",
"Shivering",
"Lack of Energy",
)
animal = st.selectbox("Animal", animal)
symptom_1 = st.selectbox("First Symptom", symptom_1)
symptom_2 = st.selectbox("Second Symptom", symptom_2)
symptom_3 = st.selectbox("Third Symptom", symptom_3)
symptom_4 = st.selectbox("Fourth Symptom", symptom_4)
symptom_5 = st.selectbox("Fifth Symptom", symptom_5)
ok = st.button("Predict Disease")
st.header("""Based on the symptoms your dog has RABIES""")
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
import streamlit as st
import pickle
import numpy as np
def show_pharmacies_page():
st.title("Pharmacies Where Animal Medicine Could Be Found")
#loading {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
top: 0;
left: 0;
opacity: 0.7;
background-color: #fff;
z-index: 99;
}
#loading-image {
z-index: 100;
}
.--dark-theme {
--chat-background: rgba(10, 14, 14, 0.95);
--chat-panel-background: #131719;
--chat-bubble-background: #2d293b;
--chat-bubble-active-background: #171a1b;
--chat-add-button-background: #212324;
--chat-send-button-background: #578170;
--chat-text-color: #ffffff;
--chat-options-svg: #a3a3a3;
}
body {
background: url(https://images.unsplash.com/photo-1495808985667-ba4ce2ef31b3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80);
background-size: cover;
}
#chat {
background: var(--chat-background);
max-width: 600px;
margin: 25px auto;
box-sizing: border-box;
padding: 1em;
border-radius: 12px;
position: relative;
overflow: hidden;
}
#chat::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(https://images.unsplash.com/photo-1495808985667-ba4ce2ef31b3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80) fixed;
z-index: -1;
}
#chat .btn-icon {
position: relative;
cursor: pointer;
}
#chat .btn-icon svg {
stroke: #FFF;
fill: #FFF;
width: 50%;
height: auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
#chat .chat__conversation-board {
padding: 1em 0 2em;
height: calc(100vh - 55px - 2em - 25px * 2 - .5em - 3em);
overflow: auto;
}
#chat .chat__conversation-board__message-container.reversed {
flex-direction: row-reverse;
}
#chat .chat__conversation-board__message-container.reversed .chat__conversation-board__message__bubble {
position: relative;
}
#chat .chat__conversation-board__message-container.reversed .chat__conversation-board__message__bubble span:not(:last-child) {
margin: 0 0 2em 0;
}
#chat .chat__conversation-board__message-container.reversed .chat__conversation-board__message__person {
margin: 0 0 0 1.2em;
}
#chat .chat__conversation-board__message-container.reversed .chat__conversation-board__message__options {
align-self: center;
position: absolute;
left: 0;
display: none;
}
#chat .chat__conversation-board__message-container {
position: relative;
display: flex;
flex-direction: row;
}
#chat .chat__conversation-board__message-container:hover .chat__conversation-board__message__options {
display: flex;
align-items: center;
}
#chat .chat__conversation-board__message-container:hover .option-item:not(:last-child) {
margin: 0 0.5em 0 0;
}
#chat .chat__conversation-board__message-container:not(:last-child) {
margin: 0 0 2em 0;
}
#chat .chat__conversation-board__message__person {
text-align: center;
margin: 0 1.2em 0 0;
}
#chat .chat__conversation-board__message__person__avatar {
height: 35px;
width: 35px;
overflow: hidden;
border-radius: 50%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
ms-user-select: none;
position: relative;
}
#chat .chat__conversation-board__message__person__avatar::before {
content: "";
position: absolute;
height: 100%;
width: 100%;
}
#chat .chat__conversation-board__message__person__avatar img {
height: 100%;
width: auto;
}
#chat .chat__conversation-board__message__person__nickname {
font-size: 9px;
color: #484848;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
display: none;
}
#chat .chat__conversation-board__message__context {
max-width: 55%;
align-self: flex-end;
}
#chat .chat__conversation-board__message__options {
align-self: center;
position: absolute;
right: 0;
display: none;
}
#chat .chat__conversation-board__message__options .option-item {
border: 0;
background: 0;
padding: 0;
margin: 0;
height: 16px;
width: 16px;
outline: none;
}
#chat .chat__conversation-board__message__options .emoji-button svg {
stroke: var(--chat-options-svg);
fill: transparent;
width: 100%;
}
#chat .chat__conversation-board__message__options .more-button svg {
stroke: var(--chat-options-svg);
fill: transparent;
width: 100%;
}
#chat .chat__conversation-board__message__bubble span {
width: -webkit-fit-content;
width: -moz-fit-content;
width: fit-content;
display: inline-table;
word-wrap: break-word;
background: var(--chat-bubble-background);
font-size: 13px;
color: var(--chat-text-color);
padding: 0.5em 0.8em;
line-height: 1.5;
border-radius: 6px;
font-family: "Lato", sans-serif;
}
#chat .chat__conversation-board__message__bubble:not(:last-child) {
margin: 0 0 0.3em;
}
#chat .chat__conversation-board__message__bubble:active {
background: var(--chat-bubble-active-background);
}
#chat .chat__conversation-panel {
background: var(--chat-panel-background);
border-radius: 12px;
padding: 0 1em;
height: 55px;
margin: 0.5em 0 0;
}
#chat .chat__conversation-panel__container {
display: flex;
flex-direction: row;
align-items: center;
height: 100%;
}
#chat .chat__conversation-panel__container .panel-item:not(:last-child) {
margin: 0 1em 0 0;
}
#chat .chat__conversation-panel__button {
background: grey;
height: 20px;
width: 30px;
border: 0;
padding: 0;
outline: none;
cursor: pointer;
}
#chat .chat__conversation-panel .add-file-button {
height: 23px;
min-width: 23px;
width: 23px;
background: var(--chat-add-button-background);
border-radius: 50%;
}
#chat .chat__conversation-panel .add-file-button svg {
width: 70%;
stroke: #54575c;
}
#chat .chat__conversation-panel .emoji-button {
min-width: 23px;
width: 23px;
height: 23px;
background: transparent;
border-radius: 50%;
}
#chat .chat__conversation-panel .emoji-button svg {
width: 100%;
fill: transparent;
stroke: #54575c;
}
#chat .chat__conversation-panel .send-message-button {
background: var(--chat-send-button-background);
height: 30px;
min-width: 30px;
border-radius: 50%;
transition: 0.3s ease;
}
#chat .chat__conversation-panel .send-message-button:active {
transform: scale(0.97);
}
#chat .chat__conversation-panel .send-message-button svg {
margin: 1px -1px;
}
#chat .chat__conversation-panel__input {
width: 100%;
height: 100%;
outline: none;
position: relative;
color: var(--chat-text-color);
font-size: 13px;
background: transparent;
border: 0;
font-family: "Lato", sans-serif;
resize: none;
}
@media only screen and (max-width: 600px) {
#chat {
margin: 0;
border-radius: 0;
}
#chat .chat__conversation-board {
height: calc(100vh - 55px - 2em - .5em - 3em);
}
#chat .chat__conversation-board__message__options {
display: none !important;
}
}
\ No newline at end of file
body {
font-size: .875rem;
}
.feather {
width: 16px;
height: 16px;
vertical-align: text-bottom;
}
/*
* Sidebar
*/
.sidebar {
position: fixed;
top: 0;
/* rtl:raw:
right: 0;
*/
bottom: 0;
/* rtl:remove */
left: 0;
z-index: 100; /* Behind the navbar */
padding: 48px 0 0; /* Height of navbar */
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}
@media (max-width: 767.98px) {
.sidebar {
top: 5rem;
}
}
.sidebar-sticky {
position: relative;
top: 0;
height: calc(100vh - 48px);
padding-top: .5rem;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}
.sidebar .nav-link {
font-weight: 500;
color: #333;
}
.sidebar .nav-link .feather {
margin-right: 4px;
color: #727272;
}
.sidebar .nav-link.active {
color: #007bff;
}
.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
color: inherit;
}
.sidebar-heading {
font-size: .75rem;
text-transform: uppercase;
}
/*
* Navbar
*/
.navbar-brand {
padding-top: .75rem;
padding-bottom: .75rem;
font-size: 1rem;
background-color: rgba(0, 0, 0, .25);
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}
.navbar .navbar-toggler {
top: .25rem;
right: 1rem;
}
.navbar .form-control {
padding: .75rem 1rem;
border-width: 0;
border-radius: 0;
}
.form-control-dark {
color: #fff;
background-color: rgba(255, 255, 255, .1);
border-color: rgba(255, 255, 255, .1);
}
.form-control-dark:focus {
border-color: transparent;
box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}
This diff is collapsed.
$(window).on('load', function () {
$('#loading').hide();
})
var $messages = $('.messages-content');
var serverResponse = "wala";
var suggession;
//speech reco
try {
var SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
var recognition = new SpeechRecognition();
}
catch (e) {
console.log(e);
document.querySelector("div.no-browser-support").style.display = "block";
}
$('#start-record-btn').on('click', function (e) {
recognition.start();
});
recognition.onresult = (event) => {
const speechToText = event.results[0][0].transcript;
document.getElementById("MSG").value = speechToText;
//console.log(speechToText)
insertMessage()
}
function listendom(no) {
console.log(no)
//console.log(document.getElementById(no))
document.getElementById("MSG").value = no.innerHTML;
insertMessage();
}
$(window).load(function () {
$messages.mCustomScrollbar();
var welcomeMessage = "This is AI Vet.";
setTimeout(function () {
serverMessage(welcomeMessage);
}, 100);
});
function updateScrollbar() {
$messages.mCustomScrollbar("update").mCustomScrollbar('scrollTo', 'bottom', {
scrollInertia: 10,
timeout: 0
});
}
function insertMessage() {
msg = $('.message-input').val();
if ($.trim(msg) == '') {
return false;
}
$('<div class="message message-personal">' + msg + '</div>').appendTo($('.mCSB_container')).addClass('new');
fetchmsg();
$('.message-input').val(null);
updateScrollbar();
}
document.getElementById("mymsg").onsubmit = (e) => {
e.preventDefault();
insertMessage();
// serverMessage("hello");
// speechSynthesis.speak( new SpeechSynthesisUtterance("hello"));
}
function serverMessage(response2) {
if ($('.message-input').val() != '') {
return false;
}
$('<div class="message loading new"><figure class="avatar"><img src="static/css/bot.png" /></figure><span></span></div>').appendTo($('.mCSB_container'));
updateScrollbar();
setTimeout(function () {
$('.message.loading').remove();
$('<div class="message new"><figure class="avatar"><img src="static/css/bot.png" /></figure>' + response2 + '</div>').appendTo($('.mCSB_container')).addClass('new');
updateScrollbar();
}, 100 + (Math.random() * 20) * 100);
}
function fetchmsg() {
var url = 'https://chatapi-aidoctor.herokuapp.com/chatapi';
var data = document.getElementById('MSG').value;
data = JSON.stringify(data);
console.log("abc", data);
fetch(url, {
mode: 'cors',
method: 'POST',
body: JSON.stringify({ 'MSG': data }),
}).then(res => res.json()).then(response => {
console.log(response);
serverMessage(response.Reply);
speechSynthesis.speak(new SpeechSynthesisUtterance(response.Reply));
})
.catch(error => console.error('Error h:', error));
}
// getting all required elements
const searchWrapper = document.querySelector(".search-input");
const inputBox = searchWrapper.querySelector("input");
const suggBox = searchWrapper.querySelector(".autocom-box");
const icon = searchWrapper.querySelector(".icon");
let linkTag = searchWrapper.querySelector("a");
let webLink;
// if user press any key and release
inputBox.onkeyup = (e) => {
let userData = e.target.value; //user enetered data
let emptyArray = [];
if (userData) {
icon.onclick = () => {
result = details[userData];
console.log(result);
var box = document.getElementById("box");
box.textContent = result == null ? "Not found!" : result;
box.style.display = "block";
// linkTag.click();
}
emptyArray = suggestions.filter((data) => {
//filtering array value and user characters to lowercase and return only those words which are start with user enetered chars
return data.toLocaleLowerCase().search(userData.toLocaleLowerCase()) != -1;
});
emptyArray = emptyArray.map((data) => {
// passing return data inside li tag
return data = '<li>' + data + '</li>';
});
searchWrapper.classList.add("active"); //show autocomplete box
showSuggestions(emptyArray);
let allList = suggBox.querySelectorAll("li");
for (let i = 0; i < allList.length; i++) {
//adding onclick attribute in all li tag
allList[i].setAttribute("onclick", "select(this)");
}
} else {
searchWrapper.classList.remove("active"); //hide autocomplete box
}
}
function select(element) {
let selectData = element.textContent;
inputBox.value = selectData;
icon.onclick = () => {
result = details[selectData];
console.log(result);
var box = document.getElementById("box");
box.textContent = result == null ? "Not found!" : result;
box.style.display = "block";
// linkTag.click();
}
searchWrapper.classList.remove("active");
}
function showSuggestions(list) {
let listData;
if (!list.length) {
userValue = inputBox.value;
listData = '<li>' + userValue + '</li>';
} else {
listData = list.join('');
}
suggBox.innerHTML = listData;
}
/* globals Chart:false, feather:false */
(function () {
'use strict'
feather.replace()
// Graphs
var ctx = document.getElementById('myChart')
// eslint-disable-next-line no-unused-vars
})()
This diff is collapsed.
This diff is collapsed.
let suggestions = ["\u0996\u09bf\u099f\u0996\u09bf\u099f\u09c7", "\u099a\u09be\u09ae\u09a1\u09bc\u09be \u09ab\u09c1\u09b8\u0995\u09c1\u09a1\u09bc\u09bf", "\u09a8\u09cb\u09a1\u09be\u09b2 \u09a4\u09cd\u09ac\u0995 \u0985\u0997\u09cd\u09a8\u09cd\u09af\u09c1\u09ce\u09aa\u09be\u09a4", "\u0995\u09cd\u09b0\u09ae\u09be\u0997\u09a4 \u099b\u09bf\u09a6\u09cd\u09b0", "\u0995\u09BE\u0981\u09AA\u09C1\u09A8\u09BF", "\u099a\u09bf\u09b2\u09b8", "\u09b8\u0982\u09af\u09cb\u0997\u09c7 \u09ac\u09cd\u09af\u09a5\u09be", "\u09aa\u09c7\u099f \u09ac\u09cd\u09af\u09a5\u09be", "\u0985\u09ae\u09cd\u09b2\u09a4\u09be", "\u099C\u09BF\u09B9\u09CD\u09AC\u09BE\u09AF\u09BC \u0986\u09B2\u09B8\u09BE\u09B0", "\u09aa\u09c7\u09b6\u09c0 \u09a8\u09b7\u09cd\u099f", "\u09AC\u09AE\u09BF", "\u09AA\u09CD\u09B0\u09B8\u09CD\u09B0\u09BE\u09AC\u09C7 \u099C\u09CD\u09AC\u09BE\u09B2\u09BE\u09AA\u09CB\u09A1\u09BC\u09BE", "\u09aa\u09cd\u09b0\u09b8\u09cd\u09b0\u09be\u09ac \u09b8\u09cd\u09aa\u099f", "\u0995\u09cd\u09b2\u09be\u09a8\u09cd\u09a4\u09bf", "\u0993\u099c\u09a8 \u09ac\u09c3\u09a6\u09cd\u09a7\u09bf", "\u0989\u09a6\u09cd\u09ac\u09c7\u0997", "\u09a0\u09be\u09a8\u09cd\u09a1\u09be \u09b9\u09be\u09a4 \u098f\u09ac\u0982 feets", "\u09ae\u09c7\u099c\u09be\u099c \u09b8\u09c1\u0987\u0982", "\u0993\u099c\u09a8 \u0995\u09ae\u09be\u09a8\u09cb", "\u0985\u09b8\u09cd\u09a5\u09bf\u09b0\u09a4\u09be", "\u0985\u09B2\u09B8\u09A4\u09BE", "\u0997\u09b2\u09be \u09aa\u09cd\u09af\u09be\u099a", "\u0985\u09a8\u09bf\u09af\u09bc\u09ae\u09bf\u09a4 \u099a\u09bf\u09a8\u09bf \u09b8\u09cd\u09a4\u09b0", "\u0995\u09be\u09b6\u09bf", "\u09ae\u09be\u09a4\u09cd\u09b0\u09be\u09a4\u09bf\u09b0\u09bf\u0995\u09cd\u09a4 \u099c\u09cd\u09ac\u09b0", "\u09ae\u0997\u09cd\u09a8 \u099a\u09cb\u0996", "\u09b6\u09cd\u09ac\u09be\u09b8 \u09aa\u09cd\u09b0\u09b6\u09cd\u09ac\u09be\u09b8", "\u0998\u09be\u09ae", "\u09aa\u09be\u09a8\u09bf\u09b6\u09c2\u09a8\u09cd\u09af\u09a4\u09be", "\u0985\u09b8\u09cd\u09a5\u09bf\u09b0\u09a4\u09be", "\u09ae\u09be\u09a5\u09be \u09ac\u09cd\u09af\u09be\u09a5\u09be", "\u09b9\u09b2\u09c1\u09a6 \u09a4\u09cd\u09ac\u0995", "\u09a1\u09be\u09b0\u09cd\u0995 \u09aa\u09cd\u09b0\u09b8\u09cd\u09b0\u09be\u09ac", "\u09ac\u09ae\u09bf \u09ad\u09be\u09ac", "\u0995\u09cd\u09b7\u09c1\u09a7\u09be\u09ae\u09be\u09a8\u09cd\u09a6\u09cd\u09af", "\u099a\u09cb\u0996 \u09aa\u09bf\u099b\u09a8\u09c7 \u09ac\u09cd\u09af\u09a5\u09be", "\u09aa\u09bf\u09a0\u09c7 \u09ac\u09cd\u09af\u09be\u09a5\u09be", "\u0995\u09cb\u09b7\u09cd\u09a0\u0995\u09be\u09a0\u09bf\u09a8\u09cd\u09af", "\u09aa\u09c7\u099f \u09ac\u09cd\u09af\u09a5\u09be", "\u09a1\u09be\u09af\u09bc\u09b0\u09bf\u09af\u09bc\u09be", "\u0985\u09b2\u09cd\u09aa \u099c\u09cd\u09ac\u09b0", "\u09b9\u09b2\u09c1\u09a6 \u09aa\u09cd\u09b0\u09b8\u09cd\u09b0\u09be\u09ac", "\u099a\u09cb\u0996 \u09b9\u09b2\u09c1\u09a6", "\u09a4\u09c0\u09ac\u09cd\u09b0 \u09b2\u09bf\u09ad\u09be\u09b0 \u09ac\u09cd\u09af\u09b0\u09cd\u09a5\u09a4\u09be", "\u09aa\u09be\u09a8\u09bf \u09aa\u09b0\u09bf\u09aa\u09c2\u09b0\u09cd\u09a3", "\u09aa\u09c7\u099f \u09ab\u09c1\u09b8\u0995\u09c1\u09a1\u09bc\u09bf", "\u09ab\u09cb\u09b2\u09be \u09b2\u09bf\u09ae\u09cd\u09ab \u09a8\u09cb\u09a1", "\u0985\u09B8\u09CD\u09AC\u09BE\u099A\u09CD\u099B\u09A8\u09CD\u09A6\u09CD\u09AF \u09AC\u09CB\u09A7", "\u09ac\u09bf\u09ac\u09b0\u09cd\u09a3 \u098f\u09ac\u0982 \u09ac\u09bf\u0995\u09c3\u09a4 \u09a6\u09c3\u09b7\u09cd\u099f\u09bf", "\u0995\u09AB", "\u0997\u09b2\u09be \u099c\u09cd\u09ac\u09be\u09b2\u09be", "\u099a\u09cb\u0996 \u09b2\u09be\u09b2\u09a4\u09be", "\u09b6\u09cb\u09b7 \u099a\u09be\u09aa", "\u09b8\u09b0\u09cd\u09a6\u09bf", "\u0995\u09a8\u099c\u09c7\u09b6\u09a8.", "\u09ac\u09c1\u0995 \u09ac\u09cd\u09af\u09be\u09a5\u09be", "\u0985\u0999\u09CD\u0997 \u09A6\u09C1\u09B0\u09CD\u09AC\u09B2\u09A4\u09BE", "\u09a6\u09cd\u09b0\u09c1\u09a4 \u09b9\u09be\u09b0\u09cd\u099f \u09b0\u09c7\u099f", "\u0985\u09a8\u09cd\u09a4\u09cd\u09b0 \u0986\u09a8\u09cd\u09a6\u09cb\u09b2\u09a8\u09c7\u09b0 \u09b8\u09ae\u09af\u09bc \u09ac\u09cd\u09af\u09a5\u09be", "\u09aa\u09be\u09af\u09bc\u09c2 \u0985\u099e\u09cd\u099a\u09b2\u09c7 \u09ac\u09cd\u09af\u09a5\u09be", "\u09b0\u0995\u09cd\u09a4\u09be\u0995\u09cd\u09a4 \u09b8\u09cd\u099f\u09c1\u09b2", "\u09ae\u09b2\u09a6\u09cd\u09ac\u09be\u09b0\u09c7 \u099c\u09cd\u09ac\u09be\u09b2\u09be", "\u0998\u09be\u09a1\u09bc \u09ac\u09cd\u09af\u09a5\u09be", "\u09ae\u09be\u09a5\u09be \u0998\u09cb\u09b0\u09be\u0998\u09c1\u09b0\u09bf", "\u09AC\u09BE\u09A7\u09BE", "\u099C\u0996\u09AE", "\u09b8\u09cd\u09a5\u09c2\u09b2\u09a4\u09be", "\u09AA\u09BE \u09AB\u09C1\u09B2\u09C7 \u09AF\u09BE\u0993\u09DF\u09BE", "\u09AB\u09CB\u09B2\u09BE \u09B0\u0995\u09CD\u09A4\u09A8\u09BE\u09B2\u09C0", "\u09AB\u09CB\u09B2\u09BE \u09AE\u09C1\u0996 \u098F\u09AC\u0982 \u099A\u09CB\u0996", "\u09a5\u09be\u0987\u09b0\u09af\u09bc\u09c7\u09a1 \u09ac\u09b0\u09cd\u09a7\u09bf\u09a4", "\u09ad\u0999\u09cd\u0997\u09c1\u09b0 \u09a8\u0996", "\u09AE\u09BE\u09B0\u09BE\u09A4\u09CD\u09AE\u0995 \u09AB\u09C1\u09B2\u09C7 \u09AF\u09BE\u0993\u09DF\u09BE", "\u0985\u09a4\u09cd\u09af\u09a7\u09bf\u0995 \u0995\u09cd\u09b7\u09c1\u09a7\u09be", "\u0985\u09a4\u09bf\u09b0\u09bf\u0995\u09cd\u09a4 \u09ac\u09c8\u09ac\u09be\u09b9\u09bf\u0995 \u09aa\u09b0\u09bf\u099a\u09bf\u09a4\u09bf", "\u09B6\u09C1\u0995\u09A8\u09CB \u098F\u09AC\u0982 \u09B0\u09A3\u09A8 \u09A0\u09CB\u0981\u099F", "\u0985\u09B8\u09CD\u09AA\u09B7\u09CD\u099F \u09AC\u0995\u09CD\u09A4\u09C3\u09A4\u09BE", "\u09b9\u09be\u0981\u099f\u09c1\u09b0 \u09ac\u09cd\u09af\u09be\u09a5\u09be", "\u09b9\u09bf\u09aa \u09af\u09cc\u09a5 \u09ac\u09cd\u09af\u09a5\u09be", "\u09aa\u09c7\u09b6\u09c0\u09b0 \u09a6\u09c2\u09b0\u09cd\u09ac\u09b2\u09a4\u09be", "\u09b6\u0995\u09cd\u09a4 \u0998\u09be\u09a1\u09bc", "\u09ab\u09c1\u09b8\u0995\u09c1\u09a1\u09bc\u09bf \u099c\u09af\u09bc\u09c7\u09a8\u09cd\u099f\u0997\u09c1\u09b2\u09cb\u09a4\u09c7", "\u0986\u09a8\u09cd\u09a6\u09cb\u09b2\u09a8 \u0995\u09a0\u09cb\u09b0\u09a4\u09be", "\u09b8\u09cd\u09aa\u09bf\u09a8\u09bf\u0982 \u0986\u09a8\u09cd\u09a6\u09cb\u09b2\u09a8", "\u09ad\u09be\u09b0\u09b8\u09be\u09ae\u09cd\u09af \u09b9\u09cd\u09b0\u09be\u09b8", "\u0985\u09b8\u09cd\u09a5\u09bf\u09b0\u09a4\u09be", "\u098f\u0995 \u09b6\u09b0\u09c0\u09b0\u09c7\u09b0 \u09a6\u09bf\u0995\u09c7 \u09a6\u09c1\u09b0\u09cd\u09ac\u09b2\u09a4\u09be", "\u0997\u09a8\u09cd\u09a7 \u0995\u09cd\u09b7\u09a4\u09bf", "\u09ae\u09c2\u09a4\u09cd\u09b0\u09be\u09b6\u09af\u09bc \u0985\u09b8\u09cd\u09ac\u09b8\u09cd\u09a4\u09bf", "\u09aa\u09cd\u09b0\u09b8\u09cd\u09b0\u09be\u09ac\u09c7\u09b0 \u09a8\u09cb\u0982\u09b0\u09be \u0997\u09a8\u09cd\u09a7", "\u09aa\u09cd\u09b0\u09b8\u09cd\u09b0\u09be\u09ac \u0995\u09cd\u09b0\u09ae\u09be\u0997\u09a4 \u0985\u09a8\u09c1\u09ad\u09c2\u09a4\u09bf", "\u0997\u09cd\u09af\u09be\u09b8\u09c7\u09b0 \u0989\u09a4\u09cd\u09a4\u09b0\u09a3", "\u0985\u09ad\u09cd\u09af\u09a8\u09cd\u09a4\u09b0\u09c0\u09a3 \u0996\u09bf\u099f\u0996\u09bf\u099f\u09c7", "\u09ac\u09bf\u09b7\u09be\u0995\u09cd\u09a4 \u099a\u09c7\u09b9\u09be\u09b0\u09be (\u099f\u09be\u0987\u09ab\u09cb\u09b8)", "\u09ac\u09bf\u09b7\u09a3\u09cd\u09a3\u09a4\u09be", "\u09B0\u09BE\u0997 \u09AA\u09CD\u09B0\u09AC\u09A3\u09A4\u09BE", "\u09aa\u09c7\u09b6\u09c0 \u09ac\u09cd\u09af\u09a5\u09be", "\u09aa\u09b0\u09bf\u09ac\u09b0\u09cd\u09a4\u09bf\u09a4 \u09b8\u09c7\u09a8\u09cd\u09b8\u09b0\u09bf\u09af\u09bc\u09be\u09ae", "\u09b6\u09b0\u09c0\u09b0\u09c7\u09b0 \u0989\u09aa\u09b0 \u09b2\u09be\u09b2 \u09a6\u09be\u0997", "\u09aa\u09c7\u099f \u09ac\u09cd\u09af\u09a5\u09be", "\u0985\u09b8\u09cd\u09ac\u09be\u09ad\u09be\u09ac\u09bf\u0995 \u09ae\u09be\u09b8\u09bf\u0995\u09a4\u09be", "\u09a1\u09bf\u09b8\u09cd\u0995\u09cd\u09b0\u09cb\u09ae\u09bf\u0995 \u09aa\u09cd\u09af\u09be\u099a", "\u099a\u09cb\u0996 \u09a5\u09c7\u0995\u09c7 \u09aa\u09be\u09a8\u09bf", "\u09ac\u09c3\u09a6\u09cd\u09a7\u09bf \u0995\u09cd\u09b7\u09c1\u09a7\u09be", "\u09AA\u09B2\u09BF\u0989\u09B0\u09BF\u09AF\u09BC\u09BE", "\u09aa\u09be\u09b0\u09bf\u09ac\u09be\u09b0\u09bf\u0995 \u0987\u09a4\u09bf\u09b9\u09be\u09b8", "\u09AE\u09BF\u0989\u0995\u09AF\u09BC\u09C7\u09A1 \u09B8\u09CD\u09AA\u09C1\u099F\u09BE\u09AE", "\u09b0\u09b8\u09cd\u099f\u09bf \u09b8\u09cd\u09aa\u09c1\u099f\u09c1\u09ae", "\u09ae\u09a8\u09cb\u09af\u09cb\u0997\u09c7\u09b0 \u0985\u09ad\u09be\u09ac", "\u099a\u09be\u0995\u09cd\u09b7\u09c1\u09b7 \u09ac\u09cd\u09af\u09be\u0998\u09be\u09a4", "\u09b0\u0995\u09cd\u09a4 \u09b8\u099e\u09cd\u099a\u09be\u09b2\u09a8 \u0997\u09cd\u09b0\u09b9\u09a3", "\u0986\u09A8\u09B8\u09CD\u099F\u09BE\u09B0\u09BE\u0987\u09B2 \u0987\u099E\u09CD\u099C\u09C7\u0995\u09B6\u09A8 \u0997\u09CD\u09B0\u09B9\u09A3", "\u0995\u09cb\u09ae\u09be", "\u09aa\u09c7\u099f \u09b0\u0995\u09cd\u09a4\u09aa\u09be\u09a4", "\u09AA\u09C7\u099F\u09C7\u09B0 \u0985\u09AC\u09B8\u09A8\u09CD\u09A8\u09A4\u09BE", "\u0985\u09cd\u09af\u09be\u09b2\u0995\u09cb\u09b9\u09b2 \u0996\u09b0\u099a \u0987\u09a4\u09bf\u09b9\u09be\u09b8", "\u09aa\u09be\u09a8\u09bf \u09aa\u09b0\u09bf\u09aa\u09c2\u09b0\u09cd\u09a3", "\u09A5\u09C1\u09A4\u09A8\u09BF\u09A4\u09C7 \u09B0\u0995\u09CD\u09A4", "\u09ac\u09be\u099b\u09c1\u09b0 \u0989\u09aa\u09b0 \u09ac\u09bf\u09b6\u09bf\u09b7\u09cd\u099f \u09b6\u09bf\u09b0\u09be", "\u09A7\u09DC\u09AB\u09DC\u09BE\u09A8\u09BF", "\u09ac\u09c7\u09a6\u09a8\u09be\u09a6\u09be\u09af\u09bc\u0995 \u09b9\u09be\u0981\u099f\u09be", "\u09AA\u09C1\u0981\u099C \u09AD\u09B0\u09CD\u09A4\u09BF \u09AC\u09CD\u09B0\u09A3", "\u09AC\u09CD\u09B2\u09CD\u09AF\u09BE\u0995\u09B9\u09C7\u09A1\u09B8", "\u09A6\u09CD\u09B0\u09C1\u09A4\u09AC\u09C7\u0997\u09C7 \u099B\u09C7\u09BE\u099F\u09BE", "\u099a\u09be\u09ae\u09a1\u09bc\u09be peeling.", "\u09a7\u09c1\u09b2\u09cb \u09ae\u09a4 \u09b0\u09c2\u09aa\u09be", "\u09A8\u0996\u09C7 \u099B\u09CB\u099F \u099B\u09BF\u09A6\u09CD\u09B0", "\u09AA\u09CD\u09B0\u09A6\u09BE\u09B9\u099C\u09A8\u0995 \u09A8\u0996", "\u09a8\u09be\u0995 \u0995\u09be\u099b\u09be\u0995\u09be\u099b\u09bf \u09b2\u09be\u09b2 \u0995\u09be\u09b2\u09b6\u09bf\u099f\u09c7", "\u09B9\u09B2\u09C1\u09A6 \u09AA\u09C1\u0981\u099C\u09C7\u09B0 \u0986\u09AC\u09B0\u09A3", "\u09aa\u09c2\u09b0\u09cd\u09ac\u09b0\u09c2\u09aa"]
\ No newline at end of file
/*--------------------
Mixins
--------------------*/
@mixin center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@mixin ball {
@include center;
content: '';
display: block;
width: 3px;
height: 3px;
border-radius: 50%;
background: rgba(255, 255, 255, .5);
z-index: 2;
margin-top: 4px;
animation: ball .45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
}
/*--------------------
Body
--------------------*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
background: linear-gradient(135deg, #044f48, #2a7561);
background-size: cover;
font-family: 'Open Sans', sans-serif;
font-size: 12px;
line-height: 1.3;
overflow: hidden;
}
.bg {
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
background: url('https://images.unsplash.com/photo-1451186859696-371d9477be93?crop=entropy&fit=crop&fm=jpg&h=975&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1925') no-repeat 0 0;
filter: blur(80px);
transform: scale(1.2);
}
/*--------------------
Chat
--------------------*/
.chat {
@include center;
width: 300px;
height: 80vh;
max-height: 500px;
z-index: 2;
overflow: hidden;
box-shadow: 0 5px 30px rgba(0, 0, 0, .2);
background: rgba(0, 0, 0, .5);
border-radius: 20px;
display: flex;
justify-content: space-between;
flex-direction: column;
}
/*--------------------
Chat Title
--------------------*/
.chat-title {
flex: 0 1 45px;
position: relative;
z-index: 2;
background: rgba(0, 0, 0, 0.2);
color: #fff;
text-transform: uppercase;
text-align: left;
padding: 10px 10px 10px 50px;
h1, h2 {
font-weight: normal;
font-size: 10px;
margin: 0;
padding: 0;
}
h2 {
color: rgba(255, 255, 255, .5);
font-size: 8px;
letter-spacing: 1px;
}
.avatar {
position: absolute;
z-index: 1;
top: 8px;
left: 9px;
border-radius: 30px;
width: 30px;
height: 30px;
overflow: hidden;
margin: 0;
padding: 0;
border: 2px solid rgba(255, 255, 255, 0.24);
img {
width: 100%;
height: auto;
}
}
}
/*--------------------
Messages
--------------------*/
.messages {
flex: 1 1 auto;
color: rgba(255, 255, 255, .5);
overflow: hidden;
position: relative;
width: 100%;
& .messages-content {
position: absolute;
top: 0;
left: 0;
height: 101%;
width: 100%;
}
.message {
clear: both;
float: left;
padding: 6px 10px 7px;
border-radius: 10px 10px 10px 0;
background: rgba(0, 0, 0, .3);
margin: 8px 0;
font-size: 11px;
line-height: 1.4;
margin-left: 35px;
position: relative;
text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
.timestamp {
position: absolute;
bottom: -15px;
font-size: 9px;
color: rgba(255, 255, 255, .3);
}
&::before {
content: '';
position: absolute;
bottom: -6px;
border-top: 6px solid rgba(0, 0, 0, .3);
left: 0;
border-right: 7px solid transparent;
}
.avatar {
position: absolute;
z-index: 1;
bottom: -15px;
left: -35px;
border-radius: 30px;
width: 30px;
height: 30px;
overflow: hidden;
margin: 0;
padding: 0;
border: 2px solid rgba(255, 255, 255, 0.24);
img {
width: 100%;
height: auto;
}
}
&.message-personal {
float: right;
color: #fff;
text-align: right;
background: linear-gradient(120deg, #248A52, #257287);
border-radius: 10px 10px 0 10px;
&::before {
left: auto;
right: 0;
border-right: none;
border-left: 5px solid transparent;
border-top: 4px solid #257287;
bottom: -4px;
}
}
&:last-child {
margin-bottom: 30px;
}
&.new {
transform: scale(0);
transform-origin: 0 0;
animation: bounce 500ms linear both;
}
&.loading {
&::before {
@include ball;
border: none;
animation-delay: .15s;
}
& span {
display: block;
font-size: 0;
width: 20px;
height: 10px;
position: relative;
&::before {
@include ball;
margin-left: -7px;
}
&::after {
@include ball;
margin-left: 7px;
animation-delay: .3s;
}
}
}
}
}
/*--------------------
Message Box
--------------------*/
.message-box {
flex: 0 1 40px;
width: 100%;
background: rgba(0, 0, 0, 0.3);
padding: 10px;
position: relative;
& .message-input {
background: none;
border: none;
outline: none!important;
resize: none;
color: rgba(255, 255, 255, .7);
font-size: 11px;
height: 17px;
margin: 0;
padding-right: 20px;
width: 265px;
}
textarea:focus:-webkit-placeholder{
color: transparent;
}
& .message-submit {
position: absolute;
z-index: 1;
top: 9px;
right: 10px;
color: #fff;
border: none;
background: #248A52;
font-size: 10px;
text-transform: uppercase;
line-height: 1;
padding: 6px 10px;
border-radius: 10px;
outline: none!important;
transition: background .2s ease;
&:hover {
background: #1D7745;
}
}
}
/*--------------------
Custom Srollbar
--------------------*/
.mCSB_scrollTools {
margin: 1px -3px 1px 0;
opacity: 0;
}
.mCSB_inside > .mCSB_container {
margin-right: 0px;
padding: 0 10px;
}
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
background-color: rgba(0, 0, 0, 0.5)!important;
}
/*--------------------
Bounce
--------------------*/
@keyframes bounce {
0% { transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
4.7% { transform: matrix3d(0.45, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
9.41% { transform: matrix3d(0.883, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
14.11% { transform: matrix3d(1.141, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
18.72% { transform: matrix3d(1.212, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
24.32% { transform: matrix3d(1.151, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
29.93% { transform: matrix3d(1.048, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
35.54% { transform: matrix3d(0.979, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
41.04% { transform: matrix3d(0.961, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
52.15% { transform: matrix3d(0.991, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
63.26% { transform: matrix3d(1.007, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
85.49% { transform: matrix3d(0.999, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
100% { transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
}
@keyframes ball {
from {
transform: translateY(0) scaleY(.8);
}
to {
transform: translateY(-10px);
}
}
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='img/stethoscope.png') }}" />
<link rel="stylesheet" href="{{ url_for('static', filename='css/base.css') }}">
{% block head %}
{% endblock %}
</head>
<body>
<!-- Spinner -->
<div id="loading">
<div class="spinner-border text-success" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<!-- Navigation Bar-->
<nav class="navbar navbar-expand-lg navbar-dark bg-success">
<div class="container-fluid">
<a class="navbar-brand p-0 me-2" href="./" aria-label="TRUSTYPET">
<img src="{{ url_for('static', filename='img/stethoscope.png') }}" width="40" height="35" class="img-fluid">
</img>
</a>
<a class="navbar-brand" href="./">Trustypet</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Home</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle active" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
Services
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="{{ url_for('chat_bot') }}">Disease</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="{{ url_for('chat_bot') }}">Breed</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link active" href="./contact">Contact us</a>
</li>
</ul>
<!-- <form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-light" type="submit">Search</button>
</form> -->
{% if "email" not in session %}
<button type="button" class="btn btn-primary mx-2" data-bs-toggle="modal"
data-bs-target="#loginModal">Login</button>
<button type="button" class="btn btn-danger mx-1" data-bs-toggle="modal" data-bs-target="#signupModal">Sign
up</button>
{% else %}
<a href="/dashboard" class="btn btn-outline-warning" role="button">Dashboard</a>
{% endif %}
</div>
</div>
</nav>
<!-- Modal Login -->
<div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="loginModalLabel">Login</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<!-- Modal body -->
<form action="/login" method="POST">
<div class="mb-3">
<label for="email" class="form-label">Email address</label>
<input type="email" class="form-control" id="email" aria-describedby="emailHelp" name="email" required>
<div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="remember" name="remember">
<label class="form-check-label" for="remember">Remember me</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal Signup -->
<div class="modal fade" id="signupModal" tabindex="-1" aria-labelledby="signupModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="signupModalLabel">Create an account</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<!-- Signup Modal Body -->
<form action="/signup" method="POST" oninput='password2.setCustomValidity(password.value != password2.value ? "Passwords do not match." : "")'>
<div class="row mb-3">
<label for="inputName" class="col-sm-2 col-form-label">Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputName" name="name" required>
</div>
</div>
<div class="row mb-3">
<label for="inputEmail" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail" name="email" required>
</div>
</div>
<div class="row mb-3">
<label for="inputPassword" class="col-sm-2 col-form-label">Password</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword" name="password" required>
</div>
</div>
<div class="row mb-3">
<label for="inputPassword" class="col-sm-2 col-form-label"></label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword2" name="password2" placeholder="Confirm Password" required>
</div>
</fieldset>
<div class="row mb-3">
<div class="col-sm-10 offset-sm-2">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="gridCheck1" required>
<label class="form-check-label" for="gridCheck1">
Agree to terms and conditions
</label>
</div>
</div>
</div>
<div class="d-grid gap-2 col-6 mx-auto">
<button class="btn btn-danger" type="submit">Sign up</button>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
{% block content %}
{% endblock %}
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
crossorigin="anonymous"></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.1/dist/umd/popper.min.js" integrity="sha384-SR1sx49pcuLnqZUnnPwx6FCym0wLsk5JZuNx2bPPENzswTNFaQU1RDvt3wT4gWFG" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.min.js" integrity="sha384-j0CNLUeiqtyaRmlzUHCPZ+Gy5fQu0dQ6eZ/xAww941Ai1SxSY+0EQqNXNE6DZiVc" crossorigin="anonymous"></script>
-->
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="{{ url_for('static', filename='js/base.js') }}"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<link type="text/css" rel="stylesheet" id="dark-mode-custom-link">
<link type="text/css" rel="stylesheet" id="dark-mode-general-link">
<style type="text/css" id="dark-mode-custom-style" lang="en"></style>
<style type="text/css" id="dark-mode-native-style" lang="en"></style>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Hugo 0.83.1">
{% block head %}
{% endblock %}
<link rel="canonical" href="https://getbootstrap.com/docs/5.0/examples/dashboard/">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<!-- Favicons -->
<link rel="apple-touch-icon" href="https://getbootstrap.com/docs/5.0/assets/img/favicons/apple-touch-icon.png"
sizes="180x180">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='img/stethoscope.png') }}" />
<link rel="manifest" href="https://getbootstrap.com/docs/5.0/assets/img/favicons/manifest.json">
<link rel="mask-icon" href="https://getbootstrap.com/docs/5.0/assets/img/favicons/safari-pinned-tab.svg"
color="#7952b3">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<!-- Custom styles for this template -->
<link href="{{ url_for('static', filename='css/dashboard.css') }}" rel="stylesheet">
</head>
<body data-new-gr-c-s-check-loaded="8.876.0" data-gr-ext-installed="">
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="./">Home</a>
<a href="/logout"><button type="button" class="btn btn-danger mx-2">Sign out</button></a>
</header>
<div class="container-fluid">
<div class="row">
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<div class="position-sticky pt-3">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/dashboard">
<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-home">
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
<polyline points="9 22 9 12 15 12 15 22"></polyline>
</svg>
Dashboard
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('chat_bot') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-terminal" viewBox="0 0 16 16">
<path d="M6 9a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 9zM3.854 4.146a.5.5 0 1 0-.708.708L4.793 6.5 3.146 8.146a.5.5 0 1 0 .708.708l2-2a.5.5 0 0 0 0-.708l-2-2z"/>
<path d="M2 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2zm12 1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12z"/>
</svg>
&nbsp;AI Vet
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('chat_bot') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-terminal" viewBox="0 0 16 16">
<path d="M6 9a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 9zM3.854 4.146a.5.5 0 1 0-.708.708L4.793 6.5 3.146 8.146a.5.5 0 1 0 .708.708l2-2a.5.5 0 0 0 0-.708l-2-2z"/>
<path d="M2 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2zm12 1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12z"/>
</svg>
&nbsp;Breed
</a>
</li>
<li class="nav-item">
</li>
<li class="nav-item">
</li>
</ul>
</div>
</nav>
</div>
{% block content %}
{% endblock %}
</div>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
crossorigin="anonymous"></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.1/dist/umd/popper.min.js" integrity="sha384-SR1sx49pcuLnqZUnnPwx6FCym0wLsk5JZuNx2bPPENzswTNFaQU1RDvt3wT4gWFG" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.min.js" integrity="sha384-j0CNLUeiqtyaRmlzUHCPZ+Gy5fQu0dQ6eZ/xAww941Ai1SxSY+0EQqNXNE6DZiVc" crossorigin="anonymous"></script>
-->
<script src="{{ url_for('static', filename='js/feather.js') }}"
integrity="sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE"
crossorigin="anonymous"></script>
<script src="{{ url_for('static', filename='js/dashboard.js') }}"></script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
{% extends 'base_dashboard.html' %}
{% block head %}
<title> Dashboard | TrustyPet </title>
{% endblock %}
{% block content %}
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Dashboard</h1>
</div>
<div class="row">
<div class="card mx-3 my-3 col-3" style="width: 18rem;">
<img src="{{ url_for('static', filename='img/card1.jpg') }}" />
<div class="card-body">
<h5 class="card-title">AI Vet</h5>
<p class="card-text">Predict your cat's disease with the help of an AI Vetaranian</p>
<a href="{{ url_for('chat_bot') }}" class="btn btn-primary">Click Here</a>
</div>
</div>
<div class="card mx-3 my-3 col-3" style="width: 18rem;">
<img src="{{ url_for('static', filename='img/card2.jpg') }}" />
<div class="card-body">
<h5 class="card-title">Breed</h5>
<p class="card-text">Predict your cat's breed with an image</p>
<a href="{{ url_for('chat_bot') }}" class="btn btn-primary">Click Here</a>
</div>
</div>
</div>
</main>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block head %}
<title>TrustyPet</title>
<style>
.example-divider {
height: 3rem;
background-color: rgba(0, 0, 0, .1);
border: solid rgba(0, 0, 0, .15);
border-top-width: medium;
border-right-width: medium;
border-bottom-width: medium;
border-left-width: medium;
border-width: 1px 0;
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}
</style>
{% endblock %}
{% block content %}
<div id="carouselExampleDark" class="carousel carousel-dark slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="0" class="active"
aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active" data-bs-interval="5000">
<img src="{{ url_for('static', filename='img/slide1.jpg') }}" />
<div class="carousel-caption d-none d-md-block">
<h5 class="display-6 text-dark">Could a robot replace your doctor in the near future? </h5>
<p class="lead text-dark">The contribution of modern robotics in healthcare is undisputed</p>
</div>
</div>
<div class="carousel-item" data-bs-interval="5000">
<img src="{{ url_for('static', filename='img/slide2.jpg') }}" />
<div class="carousel-caption d-none d-md-block">
<h5 class="display-6 text-dark">Robots are assisting healthcare professionals in a variety of tasks</h5>
<p class="lead text-dark">ranging from performing surgical procedures to delivering drugs, and even
facilitating their interaction with patients</p>
</div>
</div>
<div class="carousel-item">
<img src="{{ url_for('static', filename='img/slide3.jpg') }}" />
<div class="carousel-caption d-none d-md-block">
<h5 class="display-6 text-light">Chat with a Doctor</h5>
<p class="lead text-white">You can chat with a doctor anywhere & anytime you want</p>
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleDark" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleDark" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<!-- <div class="example-divider"></div> -->
<div class="container col-xxl-8 px-4 py-5">
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
<div class="col-10 col-sm-8 col-lg-6">
<img src="{{ url_for('static', filename='img/card1.jpg') }}" class="d-block mx-lg-auto img-fluid" alt=""
loading="lazy" width="700" height="500">
</div>
<div class="col-lg-6">
<h1 class="display-5 fw-bold lh-1 mb-3">Doctor Support using Artificial Intelligence </h1>
<p class="lead">Artificial Intelligence and Machine Learning are playing a great role in Medical Science. We
provide such kind of services. To learn more please visit</p>
<div class="d-grid gap-2 d-md-flex justify-content-md-start">
</div>
</div>
</div>
</div>
<div class="example-divider"></div>
<div class="container my-5">
<div class="row p-4 pb-0 pe-lg-0 pt-lg-5 align-items-center rounded-3 border shadow-lg">
<div class="col-lg-7 p-3 p-lg-5 pt-lg-3">
<h1 class="display-4 fw-bold lh-1">What we provide to you</h1>
<p class="lead">We provide you two things namely AI Doctor & Online Doctor Support. AI Doctor is a Machine
Learning application which is a Disease Prediction System using your given symptoms. We also provide
online human doctor support. To learn more visit</p>
<div class="d-grid gap-2 d-md-flex justify-content-md-start mb-4 mb-lg-3">
</div>
</div>
<div class="col-lg-4 offset-lg-1 p-0 position-relative overflow-hidden shadow-lg">
<div class="position-lg-absolute top-0 left-0 overflow-hidden">
<img class="d-block rounded-lg-3" src="{{ url_for('static', filename='img/card2.png')}}" alt=""
width="720">
</div>
</div>
</div>
</div>
<div class="example-divider"></div>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block head %}
<title> Sign in | TrustyPet | Your Virtual Doctor</title>
{% endblock %}
{% block content %}
{% if response == 'failed' %}
<div class="alert alert-danger text-center" role="alert">
Username or password or both is wrong!
</div>
{% endif %}
<div class="container">
<div class="row">
<div class="col-md-12 min-vh-100 d-flex flex-column justify-content-center">
<div class="row">
<div class="col-lg-6 col-md-8 mx-auto">
<!-- form card login -->
<div class="card rounded shadow shadow-sm">
<div class="card-header">
<h3 class="mb-0">Login</h3>
</div>
<div class="card-body">
<form action="/login" method="POST">
<div class="mb-3">
<label for="email" class="form-label">Email address</label>
<input type="email" class="form-control" id="email" aria-describedby="emailHelp" name="email" required>
<div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<input type="hidden" name="next" value="{{ request.args.get('next', '') }}" />
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="remember" name="remember">
<label class="form-check-label" for="remember">Remember me</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<!--/card-block-->
</div>
<!-- /form card login -->
</div>
</div>
<!--/row-->
</div>
<!--/col-->
</div>
<!--/row-->
</div>
<!--/container-->
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block head %}
<title> Sign up | TrustyPet | Your Virtual Veterinarian</title>
{% endblock %}
{% block content %}
<div class="container my-5">
{% if response == "success" %}
<div class="card text-center">
<div class="card-header">
Information
</div>
<div class="text-center mx-auto d-block my-2">
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill="currentColor"
class="bi bi-check-circle-fill" viewBox="0 0 16 16">
<path
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" />
</svg>
</div>
<div class="card-body">
<h5 class="card-title">Account Created Successfully!</h5>
<p class="card-text">Please log in to continue.</p>
<button type="button" class="btn btn-primary mx-2" data-bs-toggle="modal"
data-bs-target="#loginModal">Login</button>
</div>
<div class="card-footer text-muted">
© AI Vet
</div>
</div>
{% else %}
<div class="card text-center">
<div class="card-header">
Information
</div>
<div class="text-center mx-auto d-block my-2">
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill="currentColor"
class="bi bi-x-circle-fill" viewBox="0 0 16 16">
<path
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z" />
</svg>
</div>
<div class="card-body">
<h5 class="card-title">Account Created Failed!</h5>
<p class="card-text">Email already exist or database connection failed.</p>
<button type="button" class="btn btn-danger mx-1" data-bs-toggle="modal" data-bs-target="#signupModal">Sign
up</button>
</div>
<div class="card-footer text-muted">
© AI Vet
</div>
</div>
{% endif %}
</div>
<br />
{% endblock %}
\ No newline at end of file
import streamlit as st
import pickle
import numpy as np
def show_treatment_page():
st.title("Treatments For Animal Diseases")
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