Abid Ali Awan commited on
Commit
ca9beed
·
1 Parent(s): 9f507de

Refactor app.py to simplify warning suppression by using a general filter for FutureWarnings, enhancing code maintainability.

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -11,11 +11,7 @@ from transformers import (
11
  pipeline,
12
  )
13
 
14
- warnings.filterwarnings(
15
- "ignore",
16
- message="The input name `inputs` is deprecated. Please make sure to use `input_features` instead.",
17
- category=FutureWarning,
18
- )
19
 
20
  # —— CPU performance tweaks ——
21
  os.environ["OMP_NUM_THREADS"] = "4"
 
11
  pipeline,
12
  )
13
 
14
+ warnings.simplefilter("ignore", FutureWarning)
 
 
 
 
15
 
16
  # —— CPU performance tweaks ——
17
  os.environ["OMP_NUM_THREADS"] = "4"