Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,15 +5,6 @@ import pytz
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
|
| 8 |
-
import os
|
| 9 |
-
from smolagents import OpenAIServerModel
|
| 10 |
-
|
| 11 |
-
model = OpenAIServerModel(
|
| 12 |
-
model_id="gpt-4o",
|
| 13 |
-
api_base="https://api.openai.com/v1",
|
| 14 |
-
api_key=os.environ["OPENAI_API_KEY"],
|
| 15 |
-
)
|
| 16 |
-
|
| 17 |
from Gradio_UI import GradioUI
|
| 18 |
|
| 19 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
@@ -60,6 +51,7 @@ final_answer = FinalAnswerTool()
|
|
| 60 |
# custom_role_conversions=None,
|
| 61 |
# )
|
| 62 |
|
|
|
|
| 63 |
|
| 64 |
# Import tool from Hub
|
| 65 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
|
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
|
|
| 51 |
# custom_role_conversions=None,
|
| 52 |
# )
|
| 53 |
|
| 54 |
+
model = HfApiModel()
|
| 55 |
|
| 56 |
# Import tool from Hub
|
| 57 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|