Khalil Guetari commited on
Commit
535fa20
·
1 Parent(s): ae7a494

New tools

Browse files
Files changed (4) hide show
  1. .gitignore +237 -0
  2. app.py +2 -2
  3. pyproject.toml +21 -0
  4. requirements.txt +0 -5
.gitignore ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ develop-eggs/
12
+ dist/
13
+ downloads/
14
+ eggs/
15
+ .eggs/
16
+ lib/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ pip-wheel-metadata/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Django stuff:
58
+ *.log
59
+ local_settings.py
60
+ db.sqlite3
61
+ db.sqlite3-journal
62
+
63
+ # Flask stuff:
64
+ instance/
65
+ .webassets-cache
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ target/
75
+
76
+ # Jupyter Notebook
77
+ .ipynb_checkpoints
78
+
79
+ # IPython
80
+ profile_default/
81
+ ipython_config.py
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # pipenv
87
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
88
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
89
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
90
+ # install all needed dependencies.
91
+ #Pipfile.lock
92
+
93
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
94
+ __pypackages__/
95
+
96
+ # Celery stuff
97
+ celerybeat-schedule
98
+ celerybeat.pid
99
+
100
+ # SageMath parsed files
101
+ *.sage.py
102
+
103
+ # Environments
104
+ .env
105
+ .venv
106
+ env/
107
+ venv/
108
+ ENV/
109
+ env.bak/
110
+ venv.bak/
111
+
112
+ # Spyder project settings
113
+ .spyderproject
114
+ .spyproject
115
+
116
+ # Rope project settings
117
+ .ropeproject
118
+
119
+ # mkdocs documentation
120
+ /site
121
+
122
+ # mypy
123
+ .mypy_cache/
124
+ .dmypy.json
125
+ dmypy.json
126
+
127
+ # Pyre type checker
128
+ .pyre/
129
+
130
+ # Project folders
131
+ tmp/
132
+ transcripts/
133
+ videos_set/
134
+ flagged/
135
+ figures/
136
+ tf1_sequences/
137
+ videos/
138
+ audio/
139
+ tf1_data/
140
+ segments/
141
+ wandb/
142
+ test_patterns/
143
+ slates_img/
144
+ static_results/
145
+ vidchapters/
146
+ model_large.pth
147
+ model_sequenzor.pth
148
+ cdk.out/
149
+ node_modules/
150
+ archive_data/
151
+ black_frames_detection/
152
+
153
+
154
+ #############################################
155
+ ################# JETBRAINS #################
156
+ #############################################
157
+ # Source: https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
159
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
160
+
161
+ # User-specific stuff
162
+ .idea/**/workspace.xml
163
+ .idea/**/tasks.xml
164
+ .idea/**/usage.statistics.xml
165
+ .idea/**/dictionaries
166
+ .idea/**/shelf
167
+
168
+ # AWS User-specific
169
+ .idea/**/aws.xml
170
+
171
+ # Generated files
172
+ .idea/**/contentModel.xml
173
+
174
+ # Sensitive or high-churn files
175
+ .idea/**/dataSources/
176
+ .idea/**/dataSources.ids
177
+ .idea/**/dataSources.local.xml
178
+ .idea/**/sqlDataSources.xml
179
+ .idea/**/dynamic.xml
180
+ .idea/**/uiDesigner.xml
181
+ .idea/**/dbnavigator.xml
182
+
183
+ # Gradle
184
+ .idea/**/gradle.xml
185
+ .idea/**/libraries
186
+
187
+ # Gradle and Maven with auto-import
188
+ # When using Gradle or Maven with auto-import, you should exclude module files,
189
+ # since they will be recreated, and may cause churn. Uncomment if using
190
+ # auto-import.
191
+ # .idea/artifacts
192
+ # .idea/compiler.xml
193
+ # .idea/jarRepositories.xml
194
+ # .idea/modules.xml
195
+ # .idea/*.iml
196
+ # .idea/modules
197
+ # *.iml
198
+ # *.ipr
199
+
200
+ # CMake
201
+ cmake-build-*/
202
+
203
+ # Mongo Explorer plugin
204
+ .idea/**/mongoSettings.xml
205
+
206
+ # File-based project format
207
+ *.iws
208
+
209
+ # IntelliJ
210
+ out/
211
+
212
+ # mpeltonen/sbt-idea plugin
213
+ .idea_modules/
214
+
215
+ # JIRA plugin
216
+ atlassian-ide-plugin.xml
217
+
218
+ # Cursive Clojure plugin
219
+ .idea/replstate.xml
220
+
221
+ # SonarLint plugin
222
+ .idea/sonarlint/
223
+
224
+ # Crashlytics plugin (for Android Studio and IntelliJ)
225
+ com_crashlytics_export_strings.xml
226
+ crashlytics.properties
227
+ crashlytics-build.properties
228
+ fabric.properties
229
+
230
+ # Editor-based Rest Client
231
+ .idea/httpRequests
232
+
233
+ # Android studio 3.1+ serialized cache file
234
+ .idea/caches/build_file_checksums.ser
235
+ #############################################
236
+ ################# JETBRAINS #################
237
+ #############################################
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
@@ -55,7 +55,7 @@ with open("prompts.yaml", 'r') as stream:
55
 
56
  agent = CodeAgent(
57
  model=model,
58
- tools=[final_answer], ## add your tools here (don't remove final answer)
59
  max_steps=6,
60
  verbosity_level=1,
61
  grammar=None,
 
1
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
 
55
 
56
  agent = CodeAgent(
57
  model=model,
58
+ tools=[image_generation_tool, DuckDuckGoSearchTool(max_results=5)], ## add your tools here (don't remove final answer)
59
  max_steps=6,
60
  verbosity_level=1,
61
  grammar=None,
pyproject.toml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "First_agent_HF"
3
+ version = "0.1.0"
4
+ description = "Default template for PDM package"
5
+ authors = [
6
+ {name = "Khalil Guetari", email = "khalil.guetari@momentslab.com"},
7
+ ]
8
+ dependencies = [
9
+ "markdownify",
10
+ "smolagents",
11
+ "requests",
12
+ "duckduckgo-search",
13
+ "pandas",
14
+ ]
15
+ requires-python = "==3.12.*"
16
+ readme = "README.md"
17
+ license = {text = "MIT"}
18
+
19
+
20
+ [tool.pdm]
21
+ distribution = false
requirements.txt DELETED
@@ -1,5 +0,0 @@
1
- markdownify
2
- smolagents
3
- requests
4
- duckduckgo_search
5
- pandas