Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -318,18 +318,23 @@ def create_account():
|
|
318 |
@app.route("/")
|
319 |
def home():
|
320 |
global conversation_history
|
|
|
|
|
321 |
conversation_history = []
|
|
|
|
|
322 |
|
323 |
# Retrieve user information from the session
|
324 |
user_info = session.get('user_info', {})
|
325 |
account_name = user_info.get('account_name')
|
326 |
first = user_info.get('first')
|
|
|
327 |
last = user_info.get('last')
|
328 |
token2 = user_info.get('token2')
|
329 |
greet = user_info.get('greet')
|
330 |
|
331 |
if not account_name:
|
332 |
-
|
333 |
return redirect(url_for('login'))
|
334 |
|
335 |
return render_template('ai-chat-bot.html', account_name=account_name, greet=greet, first=first, last=last, token2=token2)
|
|
|
318 |
@app.route("/")
|
319 |
def home():
|
320 |
global conversation_history
|
321 |
+
global image_chat
|
322 |
+
global user_name
|
323 |
conversation_history = []
|
324 |
+
image_chat = []
|
325 |
+
user_name = []
|
326 |
|
327 |
# Retrieve user information from the session
|
328 |
user_info = session.get('user_info', {})
|
329 |
account_name = user_info.get('account_name')
|
330 |
first = user_info.get('first')
|
331 |
+
user_name.append(first)
|
332 |
last = user_info.get('last')
|
333 |
token2 = user_info.get('token2')
|
334 |
greet = user_info.get('greet')
|
335 |
|
336 |
if not account_name:
|
337 |
+
|
338 |
return redirect(url_for('login'))
|
339 |
|
340 |
return render_template('ai-chat-bot.html', account_name=account_name, greet=greet, first=first, last=last, token2=token2)
|