ale979 commited on
Commit
ebed958
·
verified ·
1 Parent(s): be9e92c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -267,10 +267,10 @@ def coordinate_simcalculation(storyline_output_storypoint_name_list):
267
 
268
  return HTMLoutput, highest_similarities, query
269
 
270
- def track_user_interaction(user_input, action, request: gr.Request):
271
  global user_id
272
 
273
- print("Query parameters:", dict(request.query_params))
274
  user_id = str(user_id)
275
 
276
 
@@ -317,8 +317,10 @@ VALUES (%s, %s, %s, %s)
317
 
318
 
319
 
320
- def profile_user(username, password):
 
321
  global user_id
 
322
  user_id = username
323
  track_user_interaction("", "login")
324
  if password == os.getenv("APP_PASSWORD"):
@@ -811,4 +813,4 @@ Outcome: Fellow consultant will develop a comprehensive understanding of AI's po
811
 
812
 
813
  gr.close_all()
814
- demo.launch(show_api=False, auth_message = "Hello there! Please log in to access the NarrativeNet Weaver using your Prolific ID as username. Use the password supplied in Qualtrics.", auth=profile_user)
 
267
 
268
  return HTMLoutput, highest_similarities, query
269
 
270
+ def track_user_interaction(user_input, action):
271
  global user_id
272
 
273
+
274
  user_id = str(user_id)
275
 
276
 
 
317
 
318
 
319
 
320
+ def profile_user(request: gr.Request):
321
+
322
  global user_id
323
+ print(dict(request.query_params))
324
  user_id = username
325
  track_user_interaction("", "login")
326
  if password == os.getenv("APP_PASSWORD"):
 
813
 
814
 
815
  gr.close_all()
816
+ demo.launch(show_api=False, auth_message = "Hello there! Please log in to access the NarrativeNet Weaver using your Prolific ID as username. Use the password supplied in Qualtrics.", auth_dependency=profile_user)