pcdoido2 commited on
Commit
e78bc70
·
verified ·
1 Parent(s): c275c0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -2,11 +2,15 @@ import streamlit as st
2
  import os
3
  import json
4
  import time
 
5
 
6
  BASE_FOLDER = "uploaded_files"
7
  CATEGORIES = ["AVATAR WORLD", "BLOX FRUITS", "TOCA LIFE"]
8
  EXPIRATION_FILE = "expirations.json"
9
 
 
 
 
10
  # --- Estilos CSS ---
11
  st.markdown("""
12
  <style>
@@ -65,7 +69,6 @@ def remove_expired_files():
65
 
66
  # --- Apagar arquivos vencidos ao iniciar ---
67
  remove_expired_files()
68
-
69
  # --- Upload ---
70
 
71
  st.header("📤 Upload de Arquivos")
@@ -99,14 +102,14 @@ if categoria:
99
  st.success("Arquivos enviados com sucesso!")
100
  st.rerun()
101
 
102
- # --- Lista de Arquivos agrupada por pasta ---
103
- st.header("📄 Arquivos Disponíveis")
104
 
105
  for categoria in CATEGORIES:
106
  folder = os.path.join(BASE_FOLDER, categoria)
107
  files = os.listdir(folder)
108
 
109
- st.subheader(f"📁 {categoria}")
110
 
111
  if not files:
112
  st.info("Nenhum arquivo na categoria.")
 
2
  import os
3
  import json
4
  import time
5
+ from huggingface_hub import list_repo_files, hf_hub_url
6
 
7
  BASE_FOLDER = "uploaded_files"
8
  CATEGORIES = ["AVATAR WORLD", "BLOX FRUITS", "TOCA LIFE"]
9
  EXPIRATION_FILE = "expirations.json"
10
 
11
+ # Dataset onde o vídeo generator salva os vídeos
12
+ DATASET_REPO = "pcdoido2/video-gerados"
13
+
14
  # --- Estilos CSS ---
15
  st.markdown("""
16
  <style>
 
69
 
70
  # --- Apagar arquivos vencidos ao iniciar ---
71
  remove_expired_files()
 
72
  # --- Upload ---
73
 
74
  st.header("📤 Upload de Arquivos")
 
102
  st.success("Arquivos enviados com sucesso!")
103
  st.rerun()
104
 
105
+ # --- Lista de Arquivos locais agrupada por pasta ---
106
+ st.header("📄 Arquivos Locais Disponíveis")
107
 
108
  for categoria in CATEGORIES:
109
  folder = os.path.join(BASE_FOLDER, categoria)
110
  files = os.listdir(folder)
111
 
112
+ st.subheader(f"📁 {categoria} (Local)")
113
 
114
  if not files:
115
  st.info("Nenhum arquivo na categoria.")