AFischer1985 commited on
Commit
6169ebe
·
1 Parent(s): c34d1b1

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +3 -3
run.py CHANGED
@@ -30,13 +30,13 @@ def respond(state, chat_history, visible_elemIDs):
30
  internal_state = state
31
  if(str(state) in [str(e) for e in visible_elemIDs]): # react to Buttons
32
  bot_message = f"I was in state \"{previous_state}\" and am now in state \"{internal_state}\". please click another button."
33
- print("respond to button!")
34
  chat_history.append((state, bot_message))
35
  else: # react to Text-Input
36
  internal_state="0"
37
  bot_message = f"I was in state \"{previous_state}\" and am now in state \"{internal_state}\" and ready to process \"{state}\". please click another button."
38
- state="0"
39
- print("respond to text!")
40
  chat_history.append((state, bot_message))
41
  visible_elemIDs= [e for e in visible_elemIDs
42
  if ((str(e) != str(internal_state))|(str(e)=="1")|(str(e)=="0"))] # delete some buttons
 
30
  internal_state = state
31
  if(str(state) in [str(e) for e in visible_elemIDs]): # react to Buttons
32
  bot_message = f"I was in state \"{previous_state}\" and am now in state \"{internal_state}\". please click another button."
33
+ #print("respond to button!")
34
  chat_history.append((state, bot_message))
35
  else: # react to Text-Input
36
  internal_state="0"
37
  bot_message = f"I was in state \"{previous_state}\" and am now in state \"{internal_state}\" and ready to process \"{state}\". please click another button."
38
+ state="1"
39
+ #print("respond to text!")
40
  chat_history.append((state, bot_message))
41
  visible_elemIDs= [e for e in visible_elemIDs
42
  if ((str(e) != str(internal_state))|(str(e)=="1")|(str(e)=="0"))] # delete some buttons