Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def get_books_for_subject(subject:str, published_in:str)-> str:
|
|
15 |
subject: A string representing the subject (e.g. 'love', 'cars', 'Girls Aloud')
|
16 |
published_in: A date range for the publication of the book (e.g. "1500-1600", "1980-1989", "")
|
17 |
"""
|
18 |
-
r = requests.get("https://openlibrary.org/subjects/%s.json?
|
19 |
return r.json()
|
20 |
|
21 |
@tool
|
@@ -56,7 +56,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
56 |
|
57 |
agent = CodeAgent(
|
58 |
model=model,
|
59 |
-
tools=[
|
60 |
max_steps=6,
|
61 |
verbosity_level=1,
|
62 |
grammar=None,
|
|
|
15 |
subject: A string representing the subject (e.g. 'love', 'cars', 'Girls Aloud')
|
16 |
published_in: A date range for the publication of the book (e.g. "1500-1600", "1980-1989", "")
|
17 |
"""
|
18 |
+
r = requests.get("https://openlibrary.org/subjects/%s.json?published_in=%s" % (quote(subject), quote(published_in)))
|
19 |
return r.json()
|
20 |
|
21 |
@tool
|
|
|
56 |
|
57 |
agent = CodeAgent(
|
58 |
model=model,
|
59 |
+
tools=[image_generation_tool, final_answer], ## add your tools here (don't remove final answer)
|
60 |
max_steps=6,
|
61 |
verbosity_level=1,
|
62 |
grammar=None,
|