Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,15 +38,23 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 38 |
|
| 39 |
|
| 40 |
final_answer = FinalAnswerTool()
|
| 41 |
-
model = HfApiModel(
|
| 42 |
-
max_tokens=2096,
|
| 43 |
-
temperature=0.5,
|
| 44 |
-
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 45 |
-
custom_role_conversions=None,
|
| 46 |
#api_key=os.getenv('HFAPIKEY'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
)
|
| 48 |
|
| 49 |
|
|
|
|
|
|
|
| 50 |
# Import tool from Hub
|
| 51 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 52 |
|
|
|
|
| 38 |
|
| 39 |
|
| 40 |
final_answer = FinalAnswerTool()
|
| 41 |
+
#model = HfApiModel(
|
| 42 |
+
#max_tokens=2096,
|
| 43 |
+
#temperature=0.5,
|
| 44 |
+
#model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 45 |
+
#custom_role_conversions=None,
|
| 46 |
#api_key=os.getenv('HFAPIKEY'),
|
| 47 |
+
#)
|
| 48 |
+
|
| 49 |
+
model = OpenAIServerModel(
|
| 50 |
+
model_id="openai/gpt-4o",
|
| 51 |
+
api_base="", # Leave this blank to query OpenAI servers.
|
| 52 |
+
api_key=os.getenv["OPENAIKEY"], # Switch to the API key for the server you're targeting.
|
| 53 |
)
|
| 54 |
|
| 55 |
|
| 56 |
+
|
| 57 |
+
|
| 58 |
# Import tool from Hub
|
| 59 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 60 |
|