jjvelezo commited on
Commit
6841503
·
verified ·
1 Parent(s): 804dd49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -28,14 +28,13 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
28
  space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
29
 
30
  if profile:
31
- username= f"{'jujovele'}"
32
  print(f"User logged in: {username}")
33
  else:
34
  print("User not logged in.")
35
  return "Please Login to Hugging Face with the button.", None
36
 
37
- api_url = "https://agents-course-unit4-scoring.hf.space/questions"
38
-
39
  questions_url = f"{api_url}/questions"
40
  submit_url = f"{api_url}/submit"
41
 
@@ -147,11 +146,9 @@ with gr.Blocks() as demo:
147
  gr.Markdown(
148
  """
149
  **Instructions:**
150
-
151
  1. Please clone this space, then modify the code to define your agent's logic, the tools, the necessary packages, etc ...
152
  2. Log in to your Hugging Face account using the button below. This uses your HF username for submission.
153
  3. Click 'Run Evaluation & Submit All Answers' to fetch questions, run your agent, submit answers, and see the score.
154
-
155
  ---
156
  **Disclaimers:**
157
  Once clicking on the "submit button, it can take quite some time ( this is the time for the agent to go through all the questions).
 
28
  space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
29
 
30
  if profile:
31
+ username= f"{profile.username}"
32
  print(f"User logged in: {username}")
33
  else:
34
  print("User not logged in.")
35
  return "Please Login to Hugging Face with the button.", None
36
 
37
+ api_url = DEFAULT_API_URL
 
38
  questions_url = f"{api_url}/questions"
39
  submit_url = f"{api_url}/submit"
40
 
 
146
  gr.Markdown(
147
  """
148
  **Instructions:**
 
149
  1. Please clone this space, then modify the code to define your agent's logic, the tools, the necessary packages, etc ...
150
  2. Log in to your Hugging Face account using the button below. This uses your HF username for submission.
151
  3. Click 'Run Evaluation & Submit All Answers' to fetch questions, run your agent, submit answers, and see the score.
 
152
  ---
153
  **Disclaimers:**
154
  Once clicking on the "submit button, it can take quite some time ( this is the time for the agent to go through all the questions).