Update routes/quy_trinh.py
Browse files- routes/quy_trinh.py +5 -1
routes/quy_trinh.py
CHANGED
|
@@ -11,7 +11,11 @@ async def quy_trinh():
|
|
| 11 |
repo_id = "doluong6/Quatest1"
|
| 12 |
|
| 13 |
all_files = list_repo_files(repo_id=repo_id, repo_type="dataset", token=HF_TOKEN)
|
| 14 |
-
pdfs = [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
return {"pdfs": pdfs}
|
| 17 |
except Exception as e:
|
|
|
|
| 11 |
repo_id = "doluong6/Quatest1"
|
| 12 |
|
| 13 |
all_files = list_repo_files(repo_id=repo_id, repo_type="dataset", token=HF_TOKEN)
|
| 14 |
+
pdfs = [
|
| 15 |
+
f.split("/")[-1]
|
| 16 |
+
for f in all_files
|
| 17 |
+
if f.startswith("Quy_trinh/") and f.lower().endswith((".pdf", ".docx", ".xlsx"))
|
| 18 |
+
]
|
| 19 |
|
| 20 |
return {"pdfs": pdfs}
|
| 21 |
except Exception as e:
|