| @@ -0,0 +1,174 @@ | |||
| import sys | |||
| from PyQt5.uic import loadUi | |||
| from PyQt5 import QtWidgets | |||
| from PyQt5.QtWidgets import QDialog, QApplication, QWidget, QLabel, QScrollArea, QVBoxLayout, QFrame, QComboBox | |||
| from PyQt5.QtGui import QPixmap | |||
| import firebase_admin | |||
| from firebase_admin import credentials, auth, db, initialize_app | |||
| import os | |||
| current_directory = os.path.dirname(os.path.realpath(__file__)) | |||
| json_path = os.path.join(current_directory, 'chatbot.json') | |||
| #cred = credentials.Certificate('/home/knight/ChatBot_UI/chatbot.json') | |||
| cred = credentials.Certificate(json_path) | |||
| firebase_admin.initialize_app(cred, {'databaseURL': 'https://chatbot-402717-default-rtdb.firebaseio.com/'}) | |||
| class RoundedVBoxLayout(QVBoxLayout): | |||
| def __init__(self): | |||
| super().__init__() | |||
| self.rounded_frame = QFrame() | |||
| self.rounded_frame.setStyleSheet("QFrame {border-radius: 50px; background-color: lightgray;}") | |||
| self.rounded_frame.setLayout(self) | |||
| def addWidget(self, widget): | |||
| # Add widgets to the rounded frame | |||
| super().addWidget(widget) | |||
| class LoginScreen(QDialog): | |||
| def __init__(self): | |||
| super(LoginScreen, self).__init__() | |||
| loadUi("login.ui",self) | |||
| self.passwordfield.setEchoMode(QtWidgets.QLineEdit.Password) | |||
| self.loginButton.clicked.connect(self.loginfunction) | |||
| #self.loginButton.clicked.connect(self.gotoDashboard) | |||
| def loginfunction(self): | |||
| username = self.emailfield.text() | |||
| password = self.passwordfield.text() | |||
| if len(username)==0 or len(password)==0: | |||
| self.labelError.setText("Please input all fields.") | |||
| else: | |||
| try: | |||
| user = auth.get_user_by_email(username) | |||
| if user: | |||
| self.gotoDashboard() | |||
| except: | |||
| print("Login Failed !") | |||
| self.labelError.setText("Login Failed Invalid Username or Password") | |||
| def gotoDashboard(self): | |||
| dashBoard = DashBoard() | |||
| widget.addWidget(dashBoard) | |||
| widget.setCurrentIndex(widget.currentIndex()+1) | |||
| class DashBoard(QDialog): | |||
| def __init__(self): | |||
| super(DashBoard, self).__init__() | |||
| loadUi('dashboard.ui', self) | |||
| self.ref = db.reference('/intents_and_questions') | |||
| self.layout = self.questionLayout | |||
| self.show_intents_questions() | |||
| self.get_intents() | |||
| def update_intent(self): | |||
| pass | |||
| def update_question(self): | |||
| pass | |||
| def get_intents(self): | |||
| self.intentCombo.setContentsMargins(40, 140, 0, 0) | |||
| data = self.ref.get() | |||
| if data: | |||
| self.intentCombo.addItems(list(data.keys())) | |||
| else: | |||
| self.intentCombo.addItems([]) | |||
| def show_intents_questions(self): | |||
| data = self.ref.get() | |||
| if data: | |||
| # Assuming data is a dictionary | |||
| for intent, questions in data.items(): | |||
| questions_text = '\n'.join(questions) | |||
| #label_text = f"Intent: {intent}\nQuestions:{questions_text}\n{'-'*50}" | |||
| label_text = f"INTENT : {intent}\n\nQUESTIONS : \n{questions_text}\n{'-'*50}" | |||
| label = QLabel(label_text) | |||
| label.setContentsMargins(20,20,20,20) | |||
| self.layout.addWidget(label) | |||
| scroll_area = QScrollArea() | |||
| scroll_area.setWidgetResizable(True) | |||
| scroll_widget = QWidget() | |||
| scroll_widget.setLayout(self.layout) | |||
| scroll_area.setWidget(scroll_widget) | |||
| #main_layout = QVBoxLayout() | |||
| main_layout = RoundedVBoxLayout() | |||
| main_layout.addWidget(scroll_area) | |||
| main_layout.setContentsMargins(20, 120, 800, 30) | |||
| self.setLayout(main_layout) | |||
| self.setGeometry(300, 300, 400, 200) | |||
| self.setWindowTitle('Dashboard') | |||
| self.show() | |||
| app = QApplication(sys.argv) | |||
| welcome = LoginScreen() | |||
| widget = QtWidgets.QStackedWidget() | |||
| widget.addWidget(welcome) | |||
| widget.setFixedHeight(800) | |||
| widget.setFixedWidth(1200) | |||
| widget.show() | |||
| try: | |||
| sys.exit(app.exec_()) | |||
| except: | |||
| print("Exiting") | |||
| @@ -0,0 +1,13 @@ | |||
| { | |||
| "type": "service_account", | |||
| "project_id": "chatbot-402717", | |||
| "private_key_id": "a8af9eb772aee6b957ee35dd990c2f29d2beb4b2", | |||
| "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDSslvYD9b5QOBc\nZpyvueKSaE71wMI2z+bozngRNufxLAVLy6p/0YkAMUfhPQGyu5Qw0X2ReXO9NOUU\n2T885CXTaXEXQOvk1Z8IAwp7i/bt/WDInVoDZ9mVu8OxNxtGJh0urLxbS4R1Fqb4\np/s1Gx/kgUOZvBTttUb5HMBZWwECclbCfowjmaUwTBp88BSZEmRV0rW+rUhcD34y\nYe6raksOgqpZbwW4JrQGNruoyJkEgOjTzE3kJ6Df5ttPyrvCFpRokvekD3uv/u+b\nRsd5Y5Obo5lNVRep2+vlMBy+4u6wypfZHONQuy+6RsA1RGBZbT0K1d4MIvJXL68g\nwtuDfbBxAgMBAAECggEABhjpY6J7NpO+HmxthcAVzoX4XYAoWqrX8EYr1zcxHYOI\nLHQqlSf6nIvgjDQOUtZe9K32Ud27d8byZ3DdRbFGRzTEpB8xyGm2cEZawP4pHWRl\nDu8vS/yPEVhJgq0RI+29z9RJv+RawyLufnEJifUUzmF/g+Ebk7C4muROLHPPztrT\n2XBG942dwFmjlrRGzb1MbQIDi7UOFY19hQskQTLMjnLIw+SfPXq8Kj3HK8JHeNc8\nVALcI4BWYZrFNYfsY5Rf0L68w07GLSnHVgndWm6nJfMw40CWaDnWG9b4QZfOFouo\nEtphmcifU9QyXOC2PvCwTJUJcbM9gQnIXbF2wczfIQKBgQD9tBS9zUGm00oe3lkx\nR5svvoUHEgAg2ZfU+ERjRPlLgnfj9FxWu/H0SPsgy66FhgyuVNvUVnWRUen2G2yB\nXbYcu8hMKMmD6BMaAyuOZMuO2m4FHS2eTgfOeSKi+dCIwbtDwuTsitjDeOKwbAFp\ne7Mos/C/ql6JPBD2og43R00coQKBgQDUmp3AsX7NPkFbNzZMrV2SCnnJ4ImmEtYj\nVGXnnSKdorCWVaID81NyNEblaRErg0kJfV7AQG45K53pIyyBvv1QETXgofc3jzw5\nXq21edzOTSFjKfTz5409Cv2cYky1+xuP2S30z3Ry7TxACCcVHXaxDLPucKhiA/24\n6V0Wdf6x0QKBgATXwimZWG55zAlozyUMq96ucVWgN1ZpMOfE0XFfqK6TT/yO9pBF\nSCoUlo6atLshwu40+nlEKTxb5u5muZyCkG5d+0XQ5X/aFztA4jz2mZghfUYlt3A1\nJxr+3vVjdWKW6B80AjCtudOJZDJf7Wr5DINzY94Uv3c5KU277C+L8eHhAoGAV8iP\nomSnaq9t5O/jJ73diNNyffyMWVoluOi8OuoSxOvL5gbtopvxtJIJQ+giAsluetCd\nMtxnpotv5Dd1xQzLIyg4CsxVe0dVIosJRolOto/6XSuRzLOrCa1kEhI0gl9wffC6\nnP6bomh6HCZBnOJRg8Eu+iDiJbZoKNWSbhfCVkECgYEAixIjtmZ8IbatLSnVs6N4\nHz9b/wLKK+nyXq2hRBmWRbBXlXDxasKavLZ/OgmtM9/R8vMrwVKvJloRVhbnK1/q\n8DrVrgFn3pJOXtzrnNtQkR6Y5uYi7cn6DVI9RhObXqY1XhLZDX4acJTSRgvUUdu8\nMuXeZr6PsBwGM5nlBTTT6Hg=\n-----END PRIVATE KEY-----\n", | |||
| "client_email": "firebase-adminsdk-7gtu4@chatbot-402717.iam.gserviceaccount.com", | |||
| "client_id": "104666490557463603037", | |||
| "auth_uri": "https://accounts.google.com/o/oauth2/auth", | |||
| "token_uri": "https://oauth2.googleapis.com/token", | |||
| "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", | |||
| "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-7gtu4%40chatbot-402717.iam.gserviceaccount.com", | |||
| "universe_domain": "googleapis.com" | |||
| } | |||
| @@ -0,0 +1,102 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <ui version="4.0"> | |||
| <class>Dialog</class> | |||
| <widget class="QDialog" name="Dialog"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>1200</width> | |||
| <height>800</height> | |||
| </rect> | |||
| </property> | |||
| <property name="windowTitle"> | |||
| <string>Dialog</string> | |||
| </property> | |||
| <widget class="QWidget" name="bgwidget" native="true"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>1201</width> | |||
| <height>801</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">QWidget#bgwidget { | |||
| background-color: qlineargradient(spread: pad, x1: 0.091, y1: 0.101636, x2: 0.991379, y2: 0.977, stop: 0 rgba(30, 30, 40, 255), stop: 1 rgba(50, 50, 80, 255)); | |||
| } | |||
| </string> | |||
| </property> | |||
| <widget class="QLabel" name="labelDashboard"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>480</x> | |||
| <y>10</y> | |||
| <width>262</width> | |||
| <height>57</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">font: 36pt "MS Shell Dlg 2"; color:rgb(255, 255, 255)</string> | |||
| </property> | |||
| <property name="text"> | |||
| <string>Dashboard</string> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignCenter</set> | |||
| </property> | |||
| </widget> | |||
| <widget class="QWidget" name="verticalLayoutWidget"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>30</x> | |||
| <y>100</y> | |||
| <width>441</width> | |||
| <height>691</height> | |||
| </rect> | |||
| </property> | |||
| <layout class="QVBoxLayout" name="questionLayout"/> | |||
| </widget> | |||
| <widget class="QLabel" name="label"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>0</x> | |||
| <y>60</y> | |||
| <width>311</width> | |||
| <height>31</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">color: rgb(255, 255, 255); | |||
| font: 75 15pt "Waree";</string> | |||
| </property> | |||
| <property name="text"> | |||
| <string>Questions and Intents</string> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignCenter</set> | |||
| </property> | |||
| </widget> | |||
| <widget class="QComboBox" name="intentCombo"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>480</x> | |||
| <y>126</y> | |||
| <width>230</width> | |||
| <height>24</height> | |||
| </rect> | |||
| </property> | |||
| <property name="font"> | |||
| <font> | |||
| <weight>75</weight> | |||
| <bold>true</bold> | |||
| </font> | |||
| </property> | |||
| </widget> | |||
| </widget> | |||
| </widget> | |||
| <resources/> | |||
| <connections/> | |||
| </ui> | |||
| @@ -0,0 +1,188 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <ui version="4.0"> | |||
| <class>Dialog</class> | |||
| <widget class="QDialog" name="Dialog"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>1200</width> | |||
| <height>800</height> | |||
| </rect> | |||
| </property> | |||
| <property name="windowTitle"> | |||
| <string>Admin Panel</string> | |||
| </property> | |||
| <widget class="QWidget" name="bgwidget" native="true"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>1200</width> | |||
| <height>800</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">QWidget#bgwidget { | |||
| background-color: qlineargradient(spread: pad, x1: 0.091, y1: 0.101636, x2: 0.991379, y2: 0.977, stop: 0 rgba(30, 30, 40, 255), stop: 1 rgba(50, 50, 80, 255)); | |||
| } | |||
| </string> | |||
| </property> | |||
| <widget class="QLabel" name="labelWelcome"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>490</x> | |||
| <y>110</y> | |||
| <width>251</width> | |||
| <height>71</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">font: 36pt "MS Shell Dlg 2"; color:rgb(255, 255, 255)</string> | |||
| </property> | |||
| <property name="text"> | |||
| <string>WELCOME</string> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignCenter</set> | |||
| </property> | |||
| </widget> | |||
| <widget class="QLabel" name="labelInfo"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>420</x> | |||
| <y>200</y> | |||
| <width>391</width> | |||
| <height>41</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">font: 16pt "MS Shell Dlg 2";color:rgb(255, 255, 255)</string> | |||
| </property> | |||
| <property name="text"> | |||
| <string>Sign in to your existing account</string> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignCenter</set> | |||
| </property> | |||
| </widget> | |||
| <widget class="QPushButton" name="loginButton"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>440</x> | |||
| <y>490</y> | |||
| <width>341</width> | |||
| <height>51</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">border-radius:20px; | |||
| background-color: rgb(170, 255, 255); | |||
| font: 14pt "MS Shell Dlg 2";</string> | |||
| </property> | |||
| <property name="text"> | |||
| <string>Log in</string> | |||
| </property> | |||
| </widget> | |||
| <widget class="QLineEdit" name="emailfield"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>440</x> | |||
| <y>290</y> | |||
| <width>341</width> | |||
| <height>51</height> | |||
| </rect> | |||
| </property> | |||
| <property name="minimumSize"> | |||
| <size> | |||
| <width>15</width> | |||
| <height>0</height> | |||
| </size> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">background-color:rgba(0,0,0,0); | |||
| font: 12pt "MS Shell Dlg 2"; | |||
| color: rgb(255, 255, 255); | |||
| </string> | |||
| </property> | |||
| </widget> | |||
| <widget class="QLineEdit" name="passwordfield"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>440</x> | |||
| <y>390</y> | |||
| <width>341</width> | |||
| <height>51</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">background-color:rgba(0,0,0,0); | |||
| font: 12pt "MS Shell Dlg 2"; | |||
| color: rgb(255, 255, 255);</string> | |||
| </property> | |||
| </widget> | |||
| <widget class="QLabel" name="labelUsername"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>440</x> | |||
| <y>270</y> | |||
| <width>81</width> | |||
| <height>20</height> | |||
| </rect> | |||
| </property> | |||
| <property name="font"> | |||
| <font> | |||
| <family>MS Shell Dlg 2</family> | |||
| <pointsize>10</pointsize> | |||
| <weight>50</weight> | |||
| <italic>false</italic> | |||
| <bold>false</bold> | |||
| </font> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">font: 10pt "MS Shell Dlg 2"; | |||
| color: rgb(255, 255, 255);</string> | |||
| </property> | |||
| <property name="text"> | |||
| <string>Username</string> | |||
| </property> | |||
| </widget> | |||
| <widget class="QLabel" name="labelPassword"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>440</x> | |||
| <y>370</y> | |||
| <width>81</width> | |||
| <height>20</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">font: 10pt "MS Shell Dlg 2"; | |||
| color: rgb(255, 255, 255);</string> | |||
| </property> | |||
| <property name="text"> | |||
| <string>Password</string> | |||
| </property> | |||
| </widget> | |||
| <widget class="QLabel" name="labelError"> | |||
| <property name="geometry"> | |||
| <rect> | |||
| <x>440</x> | |||
| <y>456</y> | |||
| <width>341</width> | |||
| <height>20</height> | |||
| </rect> | |||
| </property> | |||
| <property name="styleSheet"> | |||
| <string notr="true">font: 12pt "MS Shell Dlg 2"; color:red;</string> | |||
| </property> | |||
| <property name="text"> | |||
| <string/> | |||
| </property> | |||
| </widget> | |||
| </widget> | |||
| </widget> | |||
| <resources/> | |||
| <connections/> | |||
| </ui> | |||
| @@ -0,0 +1,124 @@ | |||
| import sys | |||
| from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit, QPushButton, QLabel, QVBoxLayout, QWidget | |||
| from PyQt5.QtMultimediaWidgets import QVideoWidget | |||
| from PyQt5.QtMultimedia import QMediaPlayer, QMediaContent | |||
| from PyQt5.QtCore import QUrl | |||
| import speech_recognition as sr | |||
| import question | |||
| import os | |||
| current_directory = os.path.dirname(os.path.realpath(__file__)) | |||
| main_video_path = os.path.join(current_directory, 'Friendly_new.mp4') | |||
| class HospitalChatbotGUI(QMainWindow): | |||
| def __init__(self): | |||
| super().__init__() | |||
| self.setWindowTitle("Hospital Chatbot") | |||
| self.setGeometry(100, 100, 800, 600) | |||
| self.central_widget = QWidget(self) | |||
| self.setCentralWidget(self.central_widget) | |||
| self.layout = QVBoxLayout() | |||
| #self.submit_button = QPushButton("Submit", self) | |||
| #self.submit_button.clicked.connect(self.get_response) | |||
| #self.layout.addWidget(self.submit_button) | |||
| self.speak_button = QPushButton("Speak", self) | |||
| self.speak_button.clicked.connect(self.audio_to_text) | |||
| self.layout.addWidget(self.speak_button) | |||
| self.video_widget = QVideoWidget(self) | |||
| self.layout.addWidget(self.video_widget) | |||
| #self.video_widget.setFixedWidth(500) | |||
| self.central_widget.setLayout(self.layout) | |||
| self.media_player = QMediaPlayer() | |||
| self.media_player.setVideoOutput(self.video_widget) | |||
| self.media_player.mediaStatusChanged.connect(self.handle_media_status_changed) | |||
| #self.sample_video_url = "/home/knight/ChatBot_UI/Friendly_new.mp4" | |||
| self.sample_video_url = main_video_path | |||
| self.answer_video_url = None | |||
| self.play_video(self.sample_video_url) | |||
| def audio_to_text(self): | |||
| init_rec = sr.Recognizer() | |||
| print("Let's speak!!") | |||
| with sr.Microphone(3) as source: | |||
| audio_data = init_rec.record(source, duration=2) | |||
| print("Recognizing your text.............") | |||
| text = init_rec.recognize_google(audio_data) | |||
| self.get_response(text.strip()) | |||
| print(text) | |||
| def get_response(self,text): | |||
| video_url = None | |||
| print("Response Text: ",text) | |||
| user_input = text.strip() | |||
| lowercase_text = user_input.lower() | |||
| matching_intent = [intent for intent, questions in question.intents_and_question.items() if any(q in lowercase_text for q in questions)] | |||
| if matching_intent: | |||
| print("Intent: ", matching_intent[0]) | |||
| video_url = question.get_video_response(matching_intent[0]) | |||
| else: | |||
| print("No matching intent found.") | |||
| if video_url: | |||
| self.play_video(video_url) | |||
| return | |||
| matching_intent = None | |||
| #self.play_video("/home/knight/ChatBot_UI/Friendly_new.mp4") | |||
| self.play_video(main_video_path) | |||
| def play_video(self, video_url): | |||
| media_content = QMediaContent(QUrl.fromLocalFile(video_url)) | |||
| self.media_player.setMedia(media_content) | |||
| self.media_player.play() | |||
| def handle_media_status_changed(self, status): | |||
| if status == QMediaPlayer.EndOfMedia: | |||
| print("Video finished playing.") | |||
| #self.play_video("/home/knight/ChatBot_UI/Friendly_new.mp4") | |||
| self.play_video(main_video_path) | |||
| if __name__ == '__main__': | |||
| app = QApplication(sys.argv) | |||
| window = HospitalChatbotGUI() | |||
| window.show() | |||
| sys.exit(app.exec_()) | |||
| @@ -0,0 +1,217 @@ | |||
| import os | |||
| current_directory = os.path.dirname(os.path.realpath(__file__)) | |||
| intents_and_question = { | |||
| "greet": [ | |||
| "hey", | |||
| "hello", | |||
| "Hello?", | |||
| "hello?", | |||
| "hi", | |||
| "hello there", | |||
| "good morning", | |||
| "good evening", | |||
| "moin", | |||
| "hey there", | |||
| "let's go", | |||
| "hey dude", | |||
| "goodmorning", | |||
| "goodevening", | |||
| "good afternoon" | |||
| ], | |||
| "appointment_booking": [ | |||
| "How can I schedule an appointment", | |||
| "I need to book an appointment with a doctor", | |||
| "what's the procedure for booking an appointment", | |||
| "hello, I'd like to schedule an appointment.", | |||
| "book an appointment", | |||
| "appointment", | |||
| "need an appointment" | |||
| ], | |||
| "doctor_information": [ | |||
| "tell me more about dr. abc", | |||
| "what's the specialty of dr. abc", | |||
| "give me the contact details for dr. abc" | |||
| "doctor", | |||
| "contact doctor", | |||
| "doctor contact", | |||
| "doctor detail", | |||
| "detail doctor" | |||
| ], | |||
| "department_information": [ | |||
| "which departments are available in the hospital", | |||
| "can you provide details about the cardiology department", | |||
| "tell me more about the pediatric department", | |||
| "department", | |||
| "which department", | |||
| "department info" | |||
| ], | |||
| "visiting_hours":[ | |||
| "what are the visiting hours for patients", | |||
| "when can I visit a patient in the hospital", | |||
| "is there a specific time for visiting hours", | |||
| "visiting time", | |||
| "visit", | |||
| "time", | |||
| "time to visit", | |||
| "visit time", | |||
| "hospital visit", | |||
| "visit hospital" | |||
| ], | |||
| "location_and_directions":[ | |||
| "how do I get to the hospital", | |||
| "can you provide me with directions to your location", | |||
| "where is the hospital situated", | |||
| "direction", | |||
| "direction hospital", | |||
| "hospital direction", | |||
| "location", | |||
| "hospital location" | |||
| ], | |||
| "billing_and_insurance": [ | |||
| "how do I pay my medical bills", | |||
| "do you accept my insurance", | |||
| "what's the billing process for a hospital stay", | |||
| "bills", | |||
| "insurance", | |||
| "pay bill", | |||
| ], | |||
| "medical_records": [ | |||
| "how can I access my medical records", | |||
| "request my medical history", | |||
| "I need a copy of my lab results", | |||
| "medical records", | |||
| "medical record", | |||
| "record", | |||
| "records", | |||
| "record medical", | |||
| "results", | |||
| "lab results", | |||
| "result copy", | |||
| "copy result" | |||
| ], | |||
| "emergency_services": [ | |||
| "what should I do in case of a medical emergency", | |||
| "how do I contact the hospital in an emergency", | |||
| "tell me about your emergency services", | |||
| "emergency", | |||
| "emergency service" | |||
| ], | |||
| "covid19_information": [ | |||
| "what safety measures are in place due to COVID-19", | |||
| "is it safe to visit the hospital during the pandemic", | |||
| "do you offer COVID-19 testing or vaccinations", | |||
| "covid19" | |||
| ], | |||
| "feedback_and_complaints": [ | |||
| "I want to provide feedback about my experience", | |||
| "how can I file a complaint about a staff member", | |||
| "share my thoughts on my recent visit", | |||
| "feedback", | |||
| "complaints", | |||
| "complain", | |||
| "share thoughts", | |||
| "experiance" | |||
| ], | |||
| "general_information": [ | |||
| "tell me more about the hospital", | |||
| "what services do you offer", | |||
| "is there a cafeteria in the hospital", | |||
| "information", | |||
| "cafeteria", | |||
| "services", | |||
| "services offered", | |||
| "offered services" | |||
| ] | |||
| } | |||
| '''video_urls = { | |||
| "greet": "/home/knight/ChatBot_UI/video/greet.mp4", | |||
| "appointment_booking": "/home/knight/ChatBot_UI/video/appointment_booking.mp4", | |||
| "doctor_information": "/home/knight/ChatBot_UI/video/doctor_information.mp4", | |||
| "department_information": "/home/knight/ChatBot_UI/video/department_information.mp4", | |||
| "visiting_hours": "/home/knight/ChatBot_UI/video/visiting_hours.mp4", | |||
| "location_and_directions": "/home/knight/ChatBot_UI/video/location_and_directions.mp4", | |||
| "billing_and_insurance": "/home/knight/ChatBot_UI/video/billing_and_insurance.mp4", | |||
| "medical_records": "/home/knight/ChatBot_UI/video/medical_records.mp4", | |||
| "emergency_assistance": "/home/knight/ChatBot_UI/video/emergency_services.mp4", | |||
| "covid19_information": "/home/knight/ChatBot_UI/video/covid19_information.mp4", | |||
| "feedback_and_complaints": "/home/knight/ChatBot_UI/video/feedback_and_complaints.mp4", | |||
| "thank_you": "/home/knight/ChatBot_UI/video/thank_you.mp4", | |||
| "general_information": "/home/knight/ChatBot_UI/video/general_information.mp4" | |||
| }''' | |||
| video_urls = { | |||
| "greet": os.path.join(current_directory, 'video', 'greet.mp4'), | |||
| "appointment_booking": os.path.join(current_directory, 'video', 'appointment_booking.mp4'), | |||
| "doctor_information": os.path.join(current_directory, 'video', 'doctor_information.mp4'), | |||
| "department_information": os.path.join(current_directory, 'video' ,'department_information.mp4'), | |||
| "visiting_hours": os.path.join(current_directory, 'video', 'visiting_hours.mp4'), | |||
| "location_and_directions": os.path.join(current_directory, 'video','location_and_directions.mp4'), | |||
| "billing_and_insurance": os.path.join(current_directory, 'video', 'billing_and_insurance.mp4'), | |||
| "medical_records": os.path.join(current_directory, 'video', 'medical_records.mp4'), | |||
| "emergency_assistance": os.path.join(current_directory, 'video','emergency_services.mp4'), | |||
| "covid19_information": os.path.join(current_directory, 'video','covid19_information.mp4'), | |||
| "feedback_and_complaints": os.path.join(current_directory, 'video','feedback_and_complaints.mp4'), | |||
| "thank_you": os.path.join(current_directory, 'video','video/thank_you.mp4'), | |||
| "general_information": os.path.join(current_directory, 'video','general_information.mp4') | |||
| } | |||
| def get_video_response(intent): | |||
| return video_urls.get(intent) | |||
| #print(get_video_response('greet')) | |||