Update app.py
Browse files3 unmodified lines4567897 unmodified lines171819202122233 unmodified linesimport pytzimport yamlfrom tools.final_answer import FinalAnswerToolfrom Gradio_UI import GradioUI7 unmodified linesarg2: the second argument"""return "What magic will you build ?"@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.3 unmodified lines456789107 unmodified lines18192021222324252627282930313233343536373839404142433 unmodified linesimport pytzimport yamlfrom tools.final_answer import FinalAnswerToolfrom pypdf import PdfReaderfrom Gradio_UI import GradioUI7 unmodified linesarg2: the second argument"""return "What magic will you build ?"from pypdf import PdfReader@tooldef read_pdf_file(file_path: str) -> str:"""This function reads the first three pages of a PDF file and returns its content as a string.Args:file_path: The path to the PDF file.Returns:A string containing the content of the PDF file."""content = ""reader = PdfReader('paper.pdf')print(len(reader.pages))pages = reader.pages[:3]for page in pages:content += page.extract_text()return content@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.
app.py+20