Spaces:
Sleeping
Sleeping
Update api/docs.py
Browse files- api/docs.py +6 -2
api/docs.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import asyncio
|
| 2 |
-
from urllib.parse import urlparse
|
| 3 |
from aiolimiter import AsyncLimiter
|
| 4 |
from pathlib import Path
|
| 5 |
import traceback
|
|
@@ -446,7 +446,11 @@ async def get_meeting_docs(req: GetMeetingDocsRequest, http_client: AsyncClient
|
|
| 446 |
raise HTTPException(
|
| 447 |
status_code=404, detail="No Excel file has been found")
|
| 448 |
|
| 449 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 450 |
filtered_df = df[~(
|
| 451 |
df["Uploaded"].isna())][["TDoc", "Title", "CR category", "For", "Source", "Type", "Agenda item", "Agenda item description", "TDoc Status"]]
|
| 452 |
filtered_df["URL"] = filtered_df["TDoc"].apply(
|
|
|
|
| 1 |
import asyncio
|
| 2 |
+
from urllib.parse import urlparse, quote
|
| 3 |
from aiolimiter import AsyncLimiter
|
| 4 |
from pathlib import Path
|
| 5 |
import traceback
|
|
|
|
| 446 |
raise HTTPException(
|
| 447 |
status_code=404, detail="No Excel file has been found")
|
| 448 |
|
| 449 |
+
|
| 450 |
+
file_url = f"{url}/{files[0]}"
|
| 451 |
+
file_url = quote(file_url, safe=":/")
|
| 452 |
+
|
| 453 |
+
df = pd.read_excel(file_url)
|
| 454 |
filtered_df = df[~(
|
| 455 |
df["Uploaded"].isna())][["TDoc", "Title", "CR category", "For", "Source", "Type", "Agenda item", "Agenda item description", "TDoc Status"]]
|
| 456 |
filtered_df["URL"] = filtered_df["TDoc"].apply(
|