iorikyo commited on
Commit
0a44641
Β·
verified Β·
1 Parent(s): 599f112

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -51,8 +51,7 @@ class SmolaAgent:
51
  tools=[search_tool],
52
  model=model,
53
  add_base_tools=True,
54
- verbosity_level=1
55
- )
56
  print("βœ… Step 4: CodeAgent initialized successfully")
57
  print("βœ… SmolaAgent initialization completed successfully!")
58
 
@@ -60,12 +59,8 @@ class SmolaAgent:
60
  print(f"❌ Step 4: CodeAgent initialization failed: {e}")
61
  print(f"❌ Step 4: Error type: {type(e).__name__}")
62
  raise
63
-
64
- except ImportError as e:
65
- print(f"❌ Import Error: {e}")
66
- print(f"❌ smolagents package may not be properly installed")
67
- self.agent = None
68
- except Exception as e:
69
  print(f"❌ General initialization error: {e}")
70
  print(f"❌ Error type: {type(e).__name__}")
71
  print(f"❌ Falling back to None agent")
@@ -117,7 +112,9 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
117
 
118
  api_url = DEFAULT_API_URL
119
  questions_url = f"{api_url}/questions"
120
- submit_url = f"{api_url}/submit" # 1. Instantiate Agent ( modify this part to create your agent)
 
 
121
  try:
122
  agent = SmolaAgent()
123
  except Exception as e:
 
51
  tools=[search_tool],
52
  model=model,
53
  add_base_tools=True,
54
+ verbosity_level=1 )
 
55
  print("βœ… Step 4: CodeAgent initialized successfully")
56
  print("βœ… SmolaAgent initialization completed successfully!")
57
 
 
59
  print(f"❌ Step 4: CodeAgent initialization failed: {e}")
60
  print(f"❌ Step 4: Error type: {type(e).__name__}")
61
  raise
62
+
63
+ except Exception as e:
 
 
 
 
64
  print(f"❌ General initialization error: {e}")
65
  print(f"❌ Error type: {type(e).__name__}")
66
  print(f"❌ Falling back to None agent")
 
112
 
113
  api_url = DEFAULT_API_URL
114
  questions_url = f"{api_url}/questions"
115
+ submit_url = f"{api_url}/submit"
116
+
117
+ # 1. Instantiate Agent ( modify this part to create your agent)
118
  try:
119
  agent = SmolaAgent()
120
  except Exception as e: