Upgrade model
Browse files
app.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
import os
|
|
|
|
|
2 |
import gradio as gr
|
3 |
import requests
|
4 |
import inspect
|
@@ -14,11 +16,15 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
14 |
class MyAgent(CodeAgent):
|
15 |
def __init__(self):
|
16 |
super().__init__(
|
17 |
-
model
|
18 |
tools=[
|
19 |
DuckDuckGoSearchTool(),
|
20 |
VisitWebpageTool()
|
21 |
],
|
|
|
|
|
|
|
|
|
22 |
)
|
23 |
|
24 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
|
1 |
import os
|
2 |
+
import re
|
3 |
+
import datetime
|
4 |
import gradio as gr
|
5 |
import requests
|
6 |
import inspect
|
|
|
16 |
class MyAgent(CodeAgent):
|
17 |
def __init__(self):
|
18 |
super().__init__(
|
19 |
+
model=InferenceClientModel(model_id="Qwen/Qwen2.5-72B-Instruct"),
|
20 |
tools=[
|
21 |
DuckDuckGoSearchTool(),
|
22 |
VisitWebpageTool()
|
23 |
],
|
24 |
+
additional_authorized_imports=[
|
25 |
+
datetime,
|
26 |
+
re
|
27 |
+
]
|
28 |
)
|
29 |
|
30 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|