Upload 6 files
Browse files- api_client.py +3 -3
api_client.py
CHANGED
|
@@ -212,7 +212,7 @@ class APIClient:
|
|
| 212 |
Usa el endpoint POST /peding_videos/upload_pending_video.
|
| 213 |
"""
|
| 214 |
|
| 215 |
-
url = f"{self.base_url}/
|
| 216 |
files = {"video": (filename, io.BytesIO(video_bytes), "video/mp4")}
|
| 217 |
# El backend engine requereix un token de query (?token=...) validat contra HF_TOKEN
|
| 218 |
hf_token = os.getenv("HF_TOKEN")
|
|
@@ -228,7 +228,7 @@ class APIClient:
|
|
| 228 |
def list_pending_videos(self) -> dict:
|
| 229 |
"""Llista els vídeos pendents al backend (endpoint GET /peding_videos/list_peding_videos)."""
|
| 230 |
|
| 231 |
-
url = f"{self.base_url}/
|
| 232 |
hf_token = os.getenv("HF_TOKEN")
|
| 233 |
params = {"token": hf_token} if hf_token else {}
|
| 234 |
try:
|
|
@@ -242,7 +242,7 @@ class APIClient:
|
|
| 242 |
def download_pending_video(self, sha1sum: str) -> dict:
|
| 243 |
"""Descarrega un vídeo pendent per sha1 (GET /peding_videos/download_peding_video)."""
|
| 244 |
|
| 245 |
-
url = f"{self.base_url}/
|
| 246 |
hf_token = os.getenv("HF_TOKEN")
|
| 247 |
params = {"sha1": sha1sum}
|
| 248 |
if hf_token:
|
|
|
|
| 212 |
Usa el endpoint POST /peding_videos/upload_pending_video.
|
| 213 |
"""
|
| 214 |
|
| 215 |
+
url = f"{self.base_url}/pending_videos/upload_pending_video"
|
| 216 |
files = {"video": (filename, io.BytesIO(video_bytes), "video/mp4")}
|
| 217 |
# El backend engine requereix un token de query (?token=...) validat contra HF_TOKEN
|
| 218 |
hf_token = os.getenv("HF_TOKEN")
|
|
|
|
| 228 |
def list_pending_videos(self) -> dict:
|
| 229 |
"""Llista els vídeos pendents al backend (endpoint GET /peding_videos/list_peding_videos)."""
|
| 230 |
|
| 231 |
+
url = f"{self.base_url}/pending_videos/list_pending_videos"
|
| 232 |
hf_token = os.getenv("HF_TOKEN")
|
| 233 |
params = {"token": hf_token} if hf_token else {}
|
| 234 |
try:
|
|
|
|
| 242 |
def download_pending_video(self, sha1sum: str) -> dict:
|
| 243 |
"""Descarrega un vídeo pendent per sha1 (GET /peding_videos/download_peding_video)."""
|
| 244 |
|
| 245 |
+
url = f"{self.base_url}/pending_videos/download_pending_video"
|
| 246 |
hf_token = os.getenv("HF_TOKEN")
|
| 247 |
params = {"sha1": sha1sum}
|
| 248 |
if hf_token:
|