Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -286,6 +286,18 @@ def show_satisfaction_survey(chat_history, lang):
|
|
286 |
def reset_chat():
|
287 |
return [], None # Clear chat history and reset user name
|
288 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
# Gradio Interface
|
290 |
with gr.Blocks() as demo:
|
291 |
selected_lang = gr.State(value="ar")
|
|
|
286 |
def reset_chat():
|
287 |
return [], None # Clear chat history and reset user name
|
288 |
|
289 |
+
# Function to initialize chat with welcome message
|
290 |
+
def init_chat():
|
291 |
+
welcome_ar = "مرحبًا بك في المساعد المصرفي الافتراضي لبنك أم درمان الوطني! يمكنك طرح أي سؤال حول خدماتنا المصرفية أو استخدام أزرار الإجراءات السريعة أدناه."
|
292 |
+
welcome_en = "Welcome to Omdurman National Bank Virtual Banking Assistant! You can ask any question about our banking services or use the quick action buttons below."
|
293 |
+
|
294 |
+
# Initialize chat with welcome messages
|
295 |
+
chat_history = []
|
296 |
+
chat_history.append([None, welcome_ar])
|
297 |
+
chat_history.append([None, welcome_en])
|
298 |
+
|
299 |
+
return chat_history
|
300 |
+
|
301 |
# Gradio Interface
|
302 |
with gr.Blocks() as demo:
|
303 |
selected_lang = gr.State(value="ar")
|