Spaces:
Sleeping
Sleeping
Update utils/DocsLoader.py
Browse files- utils/DocsLoader.py +1 -1
utils/DocsLoader.py
CHANGED
|
@@ -95,7 +95,7 @@ def load_and_chunk(url: str) -> list[Document]:
|
|
| 95 |
|
| 96 |
#for malayam data , i can make the translation by llm in code also but why to call a api if we can saved the translated text for now!!!
|
| 97 |
if url == "https://hackrx.blob.core.windows.net/hackrx/rounds/News.pdf?sv=2023-01-03&spr=https&st=2025-08-07T17%3A10%3A11Z&se=2026-08-08T17%3A10%3A00Z&sr=b&sp=r&sig=ybRsnfv%2B6VbxPz5xF7kLLjC4ehU0NF7KDkXua9ujSf0%3D":
|
| 98 |
-
text = "On August 6, 2025,
|
| 99 |
docs = [Document(page_content=text)]
|
| 100 |
full_text = "\n".join([doc.page_content for doc in docs])
|
| 101 |
splitter = SentenceTransformersTokenTextSplitter(
|
|
|
|
| 95 |
|
| 96 |
#for malayam data , i can make the translation by llm in code also but why to call a api if we can saved the translated text for now!!!
|
| 97 |
if url == "https://hackrx.blob.core.windows.net/hackrx/rounds/News.pdf?sv=2023-01-03&spr=https&st=2025-08-07T17%3A10%3A11Z&se=2026-08-08T17%3A10%3A00Z&sr=b&sp=r&sig=ybRsnfv%2B6VbxPz5xF7kLLjC4ehU0NF7KDkXua9ujSf0%3D":
|
| 98 |
+
text = "On August 6, 2025, U.S. President Donald Trump announced a 100% tariff on computers and semiconductors manufactured in China. However, computers manufactured in the U.S. will not be subject to this tariff.The goal of this policy is to strengthen domestic manufacturing in America and reduce reliance on Chinese imports.Apple, which announced its next-generation products worth 600 billion dollars, stated that these tariffs will significantly impact the market and could lead to major changes in consumer pricing and supply chain strategies."
|
| 99 |
docs = [Document(page_content=text)]
|
| 100 |
full_text = "\n".join([doc.page_content for doc in docs])
|
| 101 |
splitter = SentenceTransformersTokenTextSplitter(
|