Og2 commited on
Commit
5f81393
·
verified ·
1 Parent(s): c947750

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -54,6 +54,11 @@ async def upload_file(
54
  os.remove(part_path) # Remove the chunk after merging
55
 
56
  print(f"Final file path: {final_file_path}")
 
 
 
 
 
57
 
58
  return {
59
  "status": "success",
@@ -249,6 +254,11 @@ async def predict_action(uuid: str):
249
  # Définir le répertoire cible
250
  target_dir = Path(UPLOAD_DIR) / uuid
251
  target_dir = target_dir.absolute() # Get the absolute path
 
 
 
 
 
252
 
253
  # Chercher le fichier vidéo dans le répertoire
254
  video_extensions = {".mp4", ".avi", ".mkv", ".mov", ".flv", ".wmv", ".webm"} # Liste des extensions vidéo courantes
 
54
  os.remove(part_path) # Remove the chunk after merging
55
 
56
  print(f"Final file path: {final_file_path}")
57
+ # Lister tous les fichiers dans target_dir
58
+ files_in_dir = list(target_dir.glob("*")) # Liste tous les fichiers (y compris les sous-dossiers)
59
+ # Afficher les fichiers
60
+ for file in files_in_dir:
61
+ print(file)
62
 
63
  return {
64
  "status": "success",
 
254
  # Définir le répertoire cible
255
  target_dir = Path(UPLOAD_DIR) / uuid
256
  target_dir = target_dir.absolute() # Get the absolute path
257
+ # Lister tous les fichiers dans target_dir
258
+ files_in_dir = list(target_dir.glob("*")) # Liste tous les fichiers (y compris les sous-dossiers)
259
+ # Afficher les fichiers
260
+ for file in files_in_dir:
261
+ print(file)
262
 
263
  # Chercher le fichier vidéo dans le répertoire
264
  video_extensions = {".mp4", ".avi", ".mkv", ".mov", ".flv", ".wmv", ".webm"} # Liste des extensions vidéo courantes