7H4M3R commited on
Commit
c48241c
·
verified ·
1 Parent(s): 0381907

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +9 -0
src/streamlit_app.py CHANGED
@@ -52,6 +52,15 @@ import yt_dlp
52
  import torchaudio
53
  import yt_dlp
54
  import ffmpeg
 
 
 
 
 
 
 
 
 
55
 
56
  # Define the resampling rate in Hertz (Hz) for audio data
57
  RATE_HZ = 16000
 
52
  import torchaudio
53
  import yt_dlp
54
  import ffmpeg
55
+ import os
56
+ from transformers.utils import logging
57
+
58
+ # استخدم مجلد مؤقت للكاش داخل المشروع
59
+ os.environ["TRANSFORMERS_CACHE"] = "./hf_cache"
60
+ os.makedirs("./hf_cache", exist_ok=True)
61
+
62
+ # تسجيل الأخطاء للمساعدة في الديبق
63
+ logging.set_verbosity_info()
64
 
65
  # Define the resampling rate in Hertz (Hz) for audio data
66
  RATE_HZ = 16000