giannantonio15 commited on
Commit
86006ff
1 Parent(s): 773839f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -396,7 +396,8 @@ def main():
396
 
397
  @spaces.GPU(duration=120)
398
  def bot(history):
399
- print(history)
 
400
  global chat_engine_bandi
401
  global chat_engine_bandi_sistema_puglia
402
  global memory_bandi
@@ -408,8 +409,6 @@ def main():
408
  global current_chat_mode
409
  global token_count_bandi
410
  global token_count_bandi_sistema_puglia
411
- global user_message
412
- userMessage = user_message
413
 
414
  if(current_chat_mode=="CHAT"):
415
  if(current_collection=="BANDI"):
 
396
 
397
  @spaces.GPU(duration=120)
398
  def bot(history):
399
+ lenght = len(history)
400
+ userMessage = history[lenght-1][0]
401
  global chat_engine_bandi
402
  global chat_engine_bandi_sistema_puglia
403
  global memory_bandi
 
409
  global current_chat_mode
410
  global token_count_bandi
411
  global token_count_bandi_sistema_puglia
 
 
412
 
413
  if(current_chat_mode=="CHAT"):
414
  if(current_collection=="BANDI"):