jossoft commited on
Commit
753b508
·
1 Parent(s): 90db5df

configure apikey

Browse files
Files changed (2) hide show
  1. .gitignore +92 -0
  2. app.py +6 -1
.gitignore ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ *.egg-info/
23
+ .installed.cfg
24
+ *.egg
25
+ MANIFEST
26
+
27
+ # PyInstaller
28
+ # Usually these files are written by a python script from a template
29
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+
50
+ # Jupyter Notebook
51
+ .ipynb_checkpoints
52
+
53
+ # pyenv
54
+ .python-version
55
+
56
+ # pipenv
57
+ Pipfile.lock
58
+
59
+ # poetry
60
+ poetry.lock
61
+
62
+ # mypy
63
+ .mypy_cache/
64
+ .dmypy.json
65
+
66
+ # VS Code
67
+ .vscode/
68
+
69
+ # OS files
70
+ .DS_Store
71
+ Thumbs.db
72
+
73
+ # Local env
74
+ .env
75
+ .env.*
76
+ .venv/
77
+ venv/
78
+ ENV/
79
+ env.bak/
80
+
81
+ # Gradio temp files
82
+ *.gradio*
83
+
84
+ # Log files
85
+ *.log
86
+
87
+ # Backup files
88
+ *~
89
+ *.bak
90
+
91
+ # Ignore agent-specific files
92
+ agent.json
app.py CHANGED
@@ -6,6 +6,11 @@ import yaml
6
  from tools.final_answer import FinalAnswerTool
7
  import requests
8
  from Gradio_UI import GradioUI
 
 
 
 
 
9
 
10
  @tool
11
  def youtube_search(query: str, max_results: int = 5) -> str:
@@ -22,7 +27,7 @@ def youtube_search(query: str, max_results: int = 5) -> str:
22
 
23
  try:
24
  # Replace with your actual SerpAPI key or set it as an environment variable
25
- api_key = "YOUR_SERPAPI_KEY" # Add your SerpAPI key here
26
  url = "https://serpapi.com/search.json"
27
  params = {
28
  "engine": "youtube",
 
6
  from tools.final_answer import FinalAnswerTool
7
  import requests
8
  from Gradio_UI import GradioUI
9
+ import os
10
+ from dotenv import load_env
11
+ load_env()
12
+
13
+ HUGGINGFACE_API_KEY = os.getenv("HUGGINGFACE_API_KEY")
14
 
15
  @tool
16
  def youtube_search(query: str, max_results: int = 5) -> str:
 
27
 
28
  try:
29
  # Replace with your actual SerpAPI key or set it as an environment variable
30
+ api_key = HUGGINGFACE_API_KEY # Add your SerpAPI key here
31
  url = "https://serpapi.com/search.json"
32
  params = {
33
  "engine": "youtube",