scontess commited on
Commit
3472a3b
Β·
1 Parent(s): 700597c
Files changed (1) hide show
  1. src/streamlit_app.py +9 -0
src/streamlit_app.py CHANGED
@@ -44,6 +44,15 @@ hf_cache_path = os.getenv("HF_DATASETS_CACHE", "❌ Variabile non impostata!")
44
  # πŸ”Ή Mostra il valore nella UI di Streamlit
45
  st.write(f"πŸ“‚ Cache dei dataset Hugging Face: {hf_cache_path}")
46
 
 
 
 
 
 
 
 
 
 
47
  # πŸ“Œ Carica il dataset direttamente da Hugging Face
48
  dataset = load_dataset("sradc/imagenet_resized_64x64", split="train")
49
 
 
44
  # πŸ”Ή Mostra il valore nella UI di Streamlit
45
  st.write(f"πŸ“‚ Cache dei dataset Hugging Face: {hf_cache_path}")
46
 
47
+ # πŸ“Œ Testa se la cache ha i permessi giusti PRIMA di caricare il dataset
48
+ test_file = "/app/.cache/test.txt"
49
+ try:
50
+ with open(test_file, "w") as f:
51
+ f.write("Test permessi OK!")
52
+ st.write("βœ… La cartella ha i permessi giusti!")
53
+ except PermissionError:
54
+ st.error("❌ ERRORE: La cartella /app/.cache non ha permessi di scrittura!")
55
+
56
  # πŸ“Œ Carica il dataset direttamente da Hugging Face
57
  dataset = load_dataset("sradc/imagenet_resized_64x64", split="train")
58