Spaces:
Sleeping
Sleeping
auth
Browse files120 unmodified lines121122123124125126127128120 unmodified linesresults_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)eval_btn = gr.Button("Run Evaluation & Submit All Answers", variant="primary")if ON_SPACES:profile = gr.OAuthProfile()eval_btn.click(run_evaluation, inputs=[profile], outputs=[status_output, results_table])else:# Use dummy profile for local developmenteval_btn.click(lambda: run_evaluation(DummyProfile()), outputs=[status_output, results_table])120 unmodified lines121122123124125126127128129130131132133134135136120 unmodified linesresults_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)eval_btn = gr.Button("Run Evaluation & Submit All Answers", variant="primary")if ON_SPACES:# Use the request to get OAuth profile datadef run_evaluation_with_oauth(request: gr.Request):# Create a profile-like object from request dataclass RequestProfile:def __init__(self, username):self.username = username or "authenticated_user"profile = RequestProfile(getattr(request, 'username', None))return run_evaluation(profile)eval_btn.click(run_evaluation_with_oauth, outputs=[status_output, results_table])else:# Use dummy profile for local developmenteval_btn.click(lambda: run_evaluation(DummyProfile()), outputs=[status_output, results_table])
evaluation.py+10-2