Making multi-tenant with profile.username
Browse filesAdded profile.username to run_agents calls
app.py
CHANGED
|
@@ -46,13 +46,13 @@ def run_one(profile: gr.OAuthProfile | None) -> pd.DataFrame:
|
|
| 46 |
if not user_logged_in(profile):
|
| 47 |
return LOGIN_MESSAGE, EMPTY_RESULTS_TABLE
|
| 48 |
questions = [evaluator.get_one_question()]
|
| 49 |
-
return "Complete.", runner.run_agent(questions)
|
| 50 |
|
| 51 |
def run_all(profile: gr.OAuthProfile | None) -> pd.DataFrame:
|
| 52 |
if not user_logged_in(profile):
|
| 53 |
return LOGIN_MESSAGE, EMPTY_RESULTS_TABLE
|
| 54 |
questions = evaluator.get_questions()
|
| 55 |
-
return "Complete.", runner.run_agent(questions)
|
| 56 |
|
| 57 |
def submit(profile: gr.OAuthProfile | None) -> str:
|
| 58 |
if not user_logged_in(profile):
|
|
|
|
| 46 |
if not user_logged_in(profile):
|
| 47 |
return LOGIN_MESSAGE, EMPTY_RESULTS_TABLE
|
| 48 |
questions = [evaluator.get_one_question()]
|
| 49 |
+
return "Complete.", runner.run_agent(questions, profile.username)
|
| 50 |
|
| 51 |
def run_all(profile: gr.OAuthProfile | None) -> pd.DataFrame:
|
| 52 |
if not user_logged_in(profile):
|
| 53 |
return LOGIN_MESSAGE, EMPTY_RESULTS_TABLE
|
| 54 |
questions = evaluator.get_questions()
|
| 55 |
+
return "Complete.", runner.run_agent(questions, profile.username)
|
| 56 |
|
| 57 |
def submit(profile: gr.OAuthProfile | None) -> str:
|
| 58 |
if not user_logged_in(profile):
|