Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,11 +6,12 @@ import yaml
|
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from urllib.parse import quote
|
| 8 |
import json
|
|
|
|
| 9 |
|
| 10 |
from Gradio_UI import GradioUI
|
| 11 |
|
| 12 |
@tool
|
| 13 |
-
def get_books_for_subject(subject:str, published_in:str)-> str:
|
| 14 |
"""A tool that fetches books for a given keyword.
|
| 15 |
Args:
|
| 16 |
subject: A string representing the subject (e.g. 'love', 'cars', 'Girls Aloud')
|
|
@@ -29,7 +30,7 @@ def get_books_for_subject(subject:str, published_in:str)-> str:
|
|
| 29 |
book["authors"] = authors
|
| 30 |
book["link"] = "https://openlibrary.org" + work["key"]
|
| 31 |
books.append(book)
|
| 32 |
-
return
|
| 33 |
|
| 34 |
@tool
|
| 35 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from urllib.parse import quote
|
| 8 |
import json
|
| 9 |
+
from typing import List, Dict, Any
|
| 10 |
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
|
| 13 |
@tool
|
| 14 |
+
def get_books_for_subject(subject:str, published_in:str) -> List[Dict[str, Any]]:
|
| 15 |
"""A tool that fetches books for a given keyword.
|
| 16 |
Args:
|
| 17 |
subject: A string representing the subject (e.g. 'love', 'cars', 'Girls Aloud')
|
|
|
|
| 30 |
book["authors"] = authors
|
| 31 |
book["link"] = "https://openlibrary.org" + work["key"]
|
| 32 |
books.append(book)
|
| 33 |
+
return books
|
| 34 |
|
| 35 |
@tool
|
| 36 |
def get_current_time_in_timezone(timezone: str) -> str:
|