周倬孚 commited on
Commit
1d16843
·
1 Parent(s): fef4c91

Solve environment conflict and merge with new UI layout

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. save_data.py +1 -1
app.py CHANGED
@@ -195,7 +195,7 @@ if __name__ == "__main__":
195
 
196
  submit_btn.click(
197
  fn=lambda task, human_input, id: handle_create_sequential(task, human_input, session_manager, api_key, id),
198
- inputs=[task, human_input, identification_code],
199
  outputs=[ai_output, session_index]
200
  )
201
 
@@ -244,7 +244,7 @@ if __name__ == "__main__":
244
 
245
  create_btn.click(
246
  fn=lambda task, human_input, id: handle_create_parallel(task, human_input, session_manager, api_key, id),
247
- inputs=[task, human_input, identification_code],
248
  outputs=[ai_initial_output, final_output, session_index]
249
  )
250
 
@@ -295,7 +295,7 @@ if __name__ == "__main__":
295
 
296
  create_initial_btn.click(
297
  fn=lambda task, id: handle_create_reverse_sequential(task, session_manager, api_key, id),
298
- inputs=[task, identification_code],
299
  outputs=[initial_answer, session_index]
300
  )
301
 
 
195
 
196
  submit_btn.click(
197
  fn=lambda task, human_input, id: handle_create_sequential(task, human_input, session_manager, api_key, id),
198
+ inputs=[description, human_input, identification_code],
199
  outputs=[ai_output, session_index]
200
  )
201
 
 
244
 
245
  create_btn.click(
246
  fn=lambda task, human_input, id: handle_create_parallel(task, human_input, session_manager, api_key, id),
247
+ inputs=[description, human_input, identification_code],
248
  outputs=[ai_initial_output, final_output, session_index]
249
  )
250
 
 
295
 
296
  create_initial_btn.click(
297
  fn=lambda task, id: handle_create_reverse_sequential(task, session_manager, api_key, id),
298
+ inputs=[description, identification_code],
299
  outputs=[initial_answer, session_index]
300
  )
301
 
save_data.py CHANGED
@@ -10,7 +10,7 @@ def load_envs(local=False):
10
  """Load the environment variables."""
11
  if local:
12
  from dotenv import load_dotenv
13
- load_dotenv()
14
  service_account_info = json.loads(os.environ['GOOGLE_APPLICATION_CREDENTIALS_JSON'])
15
  SHEET_ID1 = os.environ['SHEET_ID1'] # human-ai-sequential
16
  SHEET_ID2 = os.environ['SHEET_ID2'] # human-ai-parallel
 
10
  """Load the environment variables."""
11
  if local:
12
  from dotenv import load_dotenv
13
+ load_dotenv(override=True)
14
  service_account_info = json.loads(os.environ['GOOGLE_APPLICATION_CREDENTIALS_JSON'])
15
  SHEET_ID1 = os.environ['SHEET_ID1'] # human-ai-sequential
16
  SHEET_ID2 = os.environ['SHEET_ID2'] # human-ai-parallel