Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,10 +12,14 @@ import os
|
|
| 12 |
from dotenv import load_dotenv
|
| 13 |
import uuid
|
| 14 |
|
|
|
|
| 15 |
# Google Books API setup
|
|
|
|
| 16 |
google_api_key = os.getenv("AIzaSyDOxfDDznu39CSWR3wlGK-eEV2XH2zoGf4")
|
| 17 |
books_service = build("books", "v1", developerKey=google_api_key)
|
| 18 |
|
|
|
|
|
|
|
| 19 |
# I want to try connect to a google API to get some recommendation of audiobooks!
|
| 20 |
@tool
|
| 21 |
def search_audiobooks(topic:str, limit:int=3)-> str: #it's import to specify the return type
|
|
|
|
| 12 |
from dotenv import load_dotenv
|
| 13 |
import uuid
|
| 14 |
|
| 15 |
+
|
| 16 |
# Google Books API setup
|
| 17 |
+
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "../audiobookagent-aaf910cd6329.json"
|
| 18 |
google_api_key = os.getenv("AIzaSyDOxfDDznu39CSWR3wlGK-eEV2XH2zoGf4")
|
| 19 |
books_service = build("books", "v1", developerKey=google_api_key)
|
| 20 |
|
| 21 |
+
|
| 22 |
+
|
| 23 |
# I want to try connect to a google API to get some recommendation of audiobooks!
|
| 24 |
@tool
|
| 25 |
def search_audiobooks(topic:str, limit:int=3)-> str: #it's import to specify the return type
|