Spaces:
Running
Running
| # from setup.easy_imports import PyPDFLoader | |
| import os | |
| from langchain_community.document_loaders import PyPDFLoader | |
| import requests | |
| headers = {"Authorization": f"Bearer {os.environ.get("BUBBLE_TOKEN")}"} | |
| # def obter_arquivo(id_arquivo="1735864318176x375804955201372160"): | |
| # return requests.get( | |
| # f"https://vella.app.br/version-test/api/1.1/obj/formresponseanswer/{id_arquivo}", | |
| # headers=headers, | |
| # ) | |
| def get_pdf_from_bubble( | |
| file_url=f"https://vella.app.br/version-test/fileupload/f1735864316650x718601440484441900/Boleto_DIGITICS%20Servic%CC%A7os%20de%20Secretariado%20LTDA_30_12_2024_804841714.pdf", | |
| ): | |
| result = PyPDFLoader(file_url, headers=headers) | |
| return result.load() | |