Andhie commited on
Commit
d116b3e
1 Parent(s): 876ed61

Initial Commit

Browse files
Files changed (3) hide show
  1. .gitignore +382 -0
  2. app.py +19 -0
  3. requirements.txt +5 -0
.gitignore ADDED
@@ -0,0 +1,382 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Created by https://www.toptal.com/developers/gitignore/api/python,intellij,visualstudiocode,windows,macos,linux
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python,intellij,visualstudiocode,windows,macos,linux
3
+
4
+ ### Intellij ###
5
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
6
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7
+
8
+ # User-specific stuff
9
+ .idea/**/workspace.xml
10
+ .idea/**/tasks.xml
11
+ .idea/**/usage.statistics.xml
12
+ .idea/**/dictionaries
13
+ .idea/**/shelf
14
+
15
+ # AWS User-specific
16
+ .idea/**/aws.xml
17
+
18
+ # Generated files
19
+ .idea/**/contentModel.xml
20
+
21
+ # Sensitive or high-churn files
22
+ .idea/**/dataSources/
23
+ .idea/**/dataSources.ids
24
+ .idea/**/dataSources.local.xml
25
+ .idea/**/sqlDataSources.xml
26
+ .idea/**/dynamic.xml
27
+ .idea/**/uiDesigner.xml
28
+ .idea/**/dbnavigator.xml
29
+
30
+ # Gradle
31
+ .idea/**/gradle.xml
32
+ .idea/**/libraries
33
+
34
+ # Gradle and Maven with auto-import
35
+ # When using Gradle or Maven with auto-import, you should exclude module files,
36
+ # since they will be recreated, and may cause churn. Uncomment if using
37
+ # auto-import.
38
+ # .idea/artifacts
39
+ # .idea/compiler.xml
40
+ # .idea/jarRepositories.xml
41
+ # .idea/modules.xml
42
+ # .idea/*.iml
43
+ # .idea/modules
44
+ # *.iml
45
+ # *.ipr
46
+
47
+ # CMake
48
+ cmake-build-*/
49
+
50
+ # Mongo Explorer plugin
51
+ .idea/**/mongoSettings.xml
52
+
53
+ # File-based project format
54
+ *.iws
55
+
56
+ # IntelliJ
57
+ out/
58
+
59
+ # mpeltonen/sbt-idea plugin
60
+ .idea_modules/
61
+
62
+ # JIRA plugin
63
+ atlassian-ide-plugin.xml
64
+
65
+ # Cursive Clojure plugin
66
+ .idea/replstate.xml
67
+
68
+ # SonarLint plugin
69
+ .idea/sonarlint/
70
+
71
+ # Crashlytics plugin (for Android Studio and IntelliJ)
72
+ com_crashlytics_export_strings.xml
73
+ crashlytics.properties
74
+ crashlytics-build.properties
75
+ fabric.properties
76
+
77
+ # Editor-based Rest Client
78
+ .idea/httpRequests
79
+
80
+ # Android studio 3.1+ serialized cache file
81
+ .idea/caches/build_file_checksums.ser
82
+
83
+ ### Intellij Patch ###
84
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
85
+
86
+ # *.iml
87
+ # modules.xml
88
+ # .idea/misc.xml
89
+ # *.ipr
90
+
91
+ # Sonarlint plugin
92
+ # https://plugins.jetbrains.com/plugin/7973-sonarlint
93
+ .idea/**/sonarlint/
94
+
95
+ # SonarQube Plugin
96
+ # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
97
+ .idea/**/sonarIssues.xml
98
+
99
+ # Markdown Navigator plugin
100
+ # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
101
+ .idea/**/markdown-navigator.xml
102
+ .idea/**/markdown-navigator-enh.xml
103
+ .idea/**/markdown-navigator/
104
+
105
+ # Cache file creation bug
106
+ # See https://youtrack.jetbrains.com/issue/JBR-2257
107
+ .idea/$CACHE_FILE$
108
+
109
+ # CodeStream plugin
110
+ # https://plugins.jetbrains.com/plugin/12206-codestream
111
+ .idea/codestream.xml
112
+
113
+ # Azure Toolkit for IntelliJ plugin
114
+ # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
115
+ .idea/**/azureSettings.xml
116
+
117
+ ### Linux ###
118
+ *~
119
+
120
+ # temporary files which can be created if a process still has a handle open of a deleted file
121
+ .fuse_hidden*
122
+
123
+ # KDE directory preferences
124
+ .directory
125
+
126
+ # Linux trash folder which might appear on any partition or disk
127
+ .Trash-*
128
+
129
+ # .nfs files are created when an open file is removed but is still being accessed
130
+ .nfs*
131
+
132
+ ### macOS ###
133
+ # General
134
+ .DS_Store
135
+ .AppleDouble
136
+ .LSOverride
137
+
138
+ # Icon must end with two \r
139
+ Icon
140
+
141
+
142
+ # Thumbnails
143
+ ._*
144
+
145
+ # Files that might appear in the root of a volume
146
+ .DocumentRevisions-V100
147
+ .fseventsd
148
+ .Spotlight-V100
149
+ .TemporaryItems
150
+ .Trashes
151
+ .VolumeIcon.icns
152
+ .com.apple.timemachine.donotpresent
153
+
154
+ # Directories potentially created on remote AFP share
155
+ .AppleDB
156
+ .AppleDesktop
157
+ Network Trash Folder
158
+ Temporary Items
159
+ .apdisk
160
+
161
+ ### macOS Patch ###
162
+ # iCloud generated files
163
+ *.icloud
164
+
165
+ ### Python ###
166
+ # Byte-compiled / optimized / DLL files
167
+ __pycache__/
168
+ *.py[cod]
169
+ *$py.class
170
+
171
+ # C extensions
172
+ *.so
173
+
174
+ # Distribution / packaging
175
+ .Python
176
+ build/
177
+ develop-eggs/
178
+ dist/
179
+ downloads/
180
+ eggs/
181
+ .eggs/
182
+ lib/
183
+ lib64/
184
+ parts/
185
+ sdist/
186
+ var/
187
+ wheels/
188
+ share/python-wheels/
189
+ *.egg-info/
190
+ .installed.cfg
191
+ *.egg
192
+ MANIFEST
193
+
194
+ # PyInstaller
195
+ # Usually these files are written by a python script from a template
196
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
197
+ *.manifest
198
+ *.spec
199
+
200
+ # Installer logs
201
+ pip-log.txt
202
+ pip-delete-this-directory.txt
203
+
204
+ # Unit test / coverage reports
205
+ htmlcov/
206
+ .tox/
207
+ .nox/
208
+ .coverage
209
+ .coverage.*
210
+ .cache
211
+ nosetests.xml
212
+ coverage.xml
213
+ *.cover
214
+ *.py,cover
215
+ .hypothesis/
216
+ .pytest_cache/
217
+ cover/
218
+
219
+ # Translations
220
+ *.mo
221
+ *.pot
222
+
223
+ # Django stuff:
224
+ *.log
225
+ local_settings.py
226
+ db.sqlite3
227
+ db.sqlite3-journal
228
+
229
+ # Flask stuff:
230
+ instance/
231
+ .webassets-cache
232
+
233
+ # Scrapy stuff:
234
+ .scrapy
235
+
236
+ # Sphinx documentation
237
+ docs/_build/
238
+
239
+ # PyBuilder
240
+ .pybuilder/
241
+ target/
242
+
243
+ # Jupyter Notebook
244
+ .ipynb_checkpoints
245
+
246
+ # IPython
247
+ profile_default/
248
+ ipython_config.py
249
+
250
+ # pyenv
251
+ # For a library or package, you might want to ignore these files since the code is
252
+ # intended to run in multiple environments; otherwise, check them in:
253
+ # .python-version
254
+
255
+ # pipenv
256
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
257
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
258
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
259
+ # install all needed dependencies.
260
+ #Pipfile.lock
261
+
262
+ # poetry
263
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
264
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
265
+ # commonly ignored for libraries.
266
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
267
+ #poetry.lock
268
+
269
+ # pdm
270
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
271
+ #pdm.lock
272
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
273
+ # in version control.
274
+ # https://pdm.fming.dev/#use-with-ide
275
+ .pdm.toml
276
+
277
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
278
+ __pypackages__/
279
+
280
+ # Celery stuff
281
+ celerybeat-schedule
282
+ celerybeat.pid
283
+
284
+ # SageMath parsed files
285
+ *.sage.py
286
+
287
+ # Environments
288
+ .env
289
+ .venv
290
+ env/
291
+ venv/
292
+ ENV/
293
+ env.bak/
294
+ venv.bak/
295
+
296
+ # Spyder project settings
297
+ .spyderproject
298
+ .spyproject
299
+
300
+ # Rope project settings
301
+ .ropeproject
302
+
303
+ # mkdocs documentation
304
+ /site
305
+
306
+ # mypy
307
+ .mypy_cache/
308
+ .dmypy.json
309
+ dmypy.json
310
+
311
+ # Pyre type checker
312
+ .pyre/
313
+
314
+ # pytype static type analyzer
315
+ .pytype/
316
+
317
+ # Cython debug symbols
318
+ cython_debug/
319
+
320
+ # PyCharm
321
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
322
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
323
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
324
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
325
+ #.idea/
326
+
327
+ ### Python Patch ###
328
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
329
+ poetry.toml
330
+
331
+ # ruff
332
+ .ruff_cache/
333
+
334
+ # LSP config files
335
+ pyrightconfig.json
336
+
337
+ ### VisualStudioCode ###
338
+ .vscode/*
339
+ !.vscode/settings.json
340
+ !.vscode/tasks.json
341
+ !.vscode/launch.json
342
+ !.vscode/extensions.json
343
+ !.vscode/*.code-snippets
344
+
345
+ # Local History for Visual Studio Code
346
+ .history/
347
+
348
+ # Built Visual Studio Code Extensions
349
+ *.vsix
350
+
351
+ ### VisualStudioCode Patch ###
352
+ # Ignore all local history of files
353
+ .history
354
+ .ionide
355
+
356
+ ### Windows ###
357
+ # Windows thumbnail cache files
358
+ Thumbs.db
359
+ Thumbs.db:encryptable
360
+ ehthumbs.db
361
+ ehthumbs_vista.db
362
+
363
+ # Dump file
364
+ *.stackdump
365
+
366
+ # Folder config file
367
+ [Dd]esktop.ini
368
+
369
+ # Recycle Bin used on file shares
370
+ $RECYCLE.BIN/
371
+
372
+ # Windows Installer files
373
+ *.cab
374
+ *.msi
375
+ *.msix
376
+ *.msm
377
+ *.msp
378
+
379
+ # Windows shortcuts
380
+ *.lnk
381
+
382
+ # End of https://www.toptal.com/developers/gitignore/api/python,intellij,visualstudiocode,windows,macos,linux
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ from huggingface_hub import Repository, login, logout
4
+
5
+ from core.Agent import QAAgent
6
+
7
+ if not os.path.isdir('core'):
8
+ login(token=os.environ['HF_TOKEN'])
9
+
10
+ repo = Repository(
11
+ local_dir="core",
12
+ repo_type="dataset",
13
+ clone_from=os.environ['REPO_URL'],
14
+ token=True
15
+ )
16
+ repo.git_pull()
17
+ logout()
18
+
19
+ QAAgent().chat_ui()
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ gradio
2
+ openai
3
+ llama-index
4
+ langchain
5
+ pypdf