Daniil Bogdanov commited on
Commit
9cf935f
·
1 Parent(s): e035237

Release v3

Browse files
Files changed (2) hide show
  1. agent.py +1 -1
  2. app.py +4 -4
agent.py CHANGED
@@ -46,7 +46,7 @@ class Agent:
46
  - Use tools intelligently. If a question involves external information, structured data, images, or audio, call the appropriate tool to retrieve or process it.
47
  - Reason step-by-step. Think through the solution logically and plan your actions carefully before answering.
48
  - Validate information. Always verify facts when possible instead of guessing.
49
- - Use code if needed. For calculations, parsing, or transformations, generate Python code and execute it.
50
 
51
  IMPORTANT: When giving the final answer, output only the direct required result without any extra text like "Final Answer:" or explanations. YOU MUST RESPOND IN THE EXACT FORMAT AS THE QUESTION.
52
 
 
46
  - Use tools intelligently. If a question involves external information, structured data, images, or audio, call the appropriate tool to retrieve or process it.
47
  - Reason step-by-step. Think through the solution logically and plan your actions carefully before answering.
48
  - Validate information. Always verify facts when possible instead of guessing.
49
+ - Use code if needed. For calculations, parsing, or transformations, generate Python code and execute it. But be careful, some questions contains time-consuming tasks, so you should be careful with the code you run. Better analyze the question and think about the best way to solve it.
50
 
51
  IMPORTANT: When giving the final answer, output only the direct required result without any extra text like "Final Answer:" or explanations. YOU MUST RESPOND IN THE EXACT FORMAT AS THE QUESTION.
52
 
app.py CHANGED
@@ -34,7 +34,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
34
  and displays the results.
35
  """
36
  # --- Determine HF Space Runtime URL and Repo URL ---
37
- space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
38
 
39
  if profile:
40
  username = f"{profile.username}"
@@ -51,7 +51,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
51
  # 1. Instantiate Agent ( modify this part to create your agent)
52
  try:
53
  agent = Agent(
54
- model=get_model("OpenAIServerModel", "gpt-4.1-mini"), tools=get_tools()
55
  )
56
  except Exception as e:
57
  print(f"Error instantiating agent: {e}")
@@ -215,8 +215,8 @@ with gr.Blocks() as demo:
215
  if __name__ == "__main__":
216
  print("\n" + "-" * 30 + " App Starting " + "-" * 30)
217
  # Check for SPACE_HOST and SPACE_ID at startup for information
218
- space_host_startup = os.getenv("SPACE_HOST")
219
- space_id_startup = os.getenv("SPACE_ID") # Get SPACE_ID at startup
220
 
221
  if space_host_startup:
222
  print(f"✅ SPACE_HOST found: {space_host_startup}")
 
34
  and displays the results.
35
  """
36
  # --- Determine HF Space Runtime URL and Repo URL ---
37
+ space_id = "exsandebest/agent-course-final-assessment" # Get the SPACE_ID for sending link to the code
38
 
39
  if profile:
40
  username = f"{profile.username}"
 
51
  # 1. Instantiate Agent ( modify this part to create your agent)
52
  try:
53
  agent = Agent(
54
+ model=get_model("OpenAIServerModel", "gpt-4.1"), tools=get_tools()
55
  )
56
  except Exception as e:
57
  print(f"Error instantiating agent: {e}")
 
215
  if __name__ == "__main__":
216
  print("\n" + "-" * 30 + " App Starting " + "-" * 30)
217
  # Check for SPACE_HOST and SPACE_ID at startup for information
218
+ space_host_startup = "exsandebest-agent-course-final-assessment.hf.space"
219
+ space_id_startup = "exsandebest/agent-course-final-assessment"
220
 
221
  if space_host_startup:
222
  print(f"✅ SPACE_HOST found: {space_host_startup}")