sachinkum0009 commited on
Commit
0c51967
·
verified ·
1 Parent(s): 2f26bc0

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. using_python_imports.py +26 -0
using_python_imports.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from smolagents import CodeAgent, HfApiModel, LiteLLMModel
2
+ import numpy as np
3
+ import time
4
+ import datetime
5
+
6
+ model = LiteLLMModel(
7
+ model_id="ollama_chat/qwen2:7b", # Or try other Ollama-supported models
8
+ api_base="http://127.0.0.1:11434", # Default Ollama local server
9
+ num_ctx=8192,
10
+ )
11
+
12
+ agent = CodeAgent(tools=[], model=model, additional_authorized_imports=['datetime'])
13
+
14
+ # agent.run(
15
+ # """
16
+ # Alfred needs to prepare for the party. Here are the tasks:
17
+ # 1. Prepare the drinks - 30 minutes
18
+ # 2. Decorate the mansion - 60 minutes
19
+ # 3. Set up the menu - 45 minutes
20
+ # 4. Prepare the music and playlist - 45 minutes
21
+
22
+ # If we start right now, at what time will the party be ready?
23
+ # """
24
+ # )
25
+
26
+ agent.push_to_hub("sachinkum0009/AlfredAgent")