Update app.py
Browse files
app.py
CHANGED
|
@@ -605,7 +605,7 @@ async def quy_trinh():
|
|
| 605 |
try:
|
| 606 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 607 |
all_files = list_repo_files("doluong6/Quatest1", repo_type="dataset", token=HF_TOKEN)
|
| 608 |
-
pdfs = [f.split("/")[-1] for f in all_files if f.startswith("
|
| 609 |
return JSONResponse(content={"pdfs": pdfs})
|
| 610 |
except Exception as e:
|
| 611 |
raise HTTPException(status_code=500, detail=f"Lỗi khi lấy danh sách PDF: {str(e)}")
|
|
|
|
| 605 |
try:
|
| 606 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 607 |
all_files = list_repo_files("doluong6/Quatest1", repo_type="dataset", token=HF_TOKEN)
|
| 608 |
+
pdfs = [f.split("/")[-1] for f in all_files if f.startswith("Quy_trinh/") and f.lower().endswith(".pdf")]
|
| 609 |
return JSONResponse(content={"pdfs": pdfs})
|
| 610 |
except Exception as e:
|
| 611 |
raise HTTPException(status_code=500, detail=f"Lỗi khi lấy danh sách PDF: {str(e)}")
|