jdesiree commited on
Commit
0d788c4
·
verified ·
1 Parent(s): bfa6ff6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -37,7 +37,9 @@ os.environ['HF_DATASETS_CACHE'] = '/tmp/huggingface'
37
  warnings.filterwarnings("ignore", message="Special tokens have been added")
38
  warnings.filterwarnings("ignore", category=UserWarning, module="transformers")
39
  warnings.filterwarnings("ignore", category=FutureWarning, module="huggingface_hub")
40
- torch._C._set_print_trace_warnings(False)
 
 
41
 
42
  load_dotenv(".env")
43
  HF_TOKEN = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACEHUB_API_TOKEN")
 
37
  warnings.filterwarnings("ignore", message="Special tokens have been added")
38
  warnings.filterwarnings("ignore", category=UserWarning, module="transformers")
39
  warnings.filterwarnings("ignore", category=FutureWarning, module="huggingface_hub")
40
+ # Suppress transformer warnings specifically
41
+ warnings.filterwarnings("ignore", message=".*TracerWarning.*")
42
+ warnings.filterwarnings("ignore", message=".*flash-attention.*")
43
 
44
  load_dotenv(".env")
45
  HF_TOKEN = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACEHUB_API_TOKEN")