Shaukat39 commited on
Commit
9f34c21
·
verified ·
1 Parent(s): 4fa7888

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -38,10 +38,11 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
38
  and displays the results.
39
  """
40
  # --- Determine HF Space Runtime URL and Repo URL ---
41
- space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
 
42
 
43
  if profile:
44
- username= f"{profile.username}"
45
  print(f"User logged in: {username}")
46
  else:
47
  print("User not logged in.")
@@ -107,7 +108,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
107
  return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
108
 
109
  # 4. Prepare Submission
110
-
 
111
  submission_data = {
112
  "username": username.strip(),
113
  "agent_code": agent_code.strip(), # <<< prevent newline issues here too
 
38
  and displays the results.
39
  """
40
  # --- Determine HF Space Runtime URL and Repo URL ---
41
+ space_id = os.getenv("SPACE_ID", "").strip()
42
+ # Get the SPACE_ID for sending link to the code
43
 
44
  if profile:
45
+ username= f"{profile.username.strip()}"
46
  print(f"User logged in: {username}")
47
  else:
48
  print("User not logged in.")
 
108
  return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
109
 
110
  # 4. Prepare Submission
111
+ print(f"agent_code → {repr(agent_code)}")
112
+
113
  submission_data = {
114
  "username": username.strip(),
115
  "agent_code": agent_code.strip(), # <<< prevent newline issues here too