acecalisto3 commited on
Commit
fff5a3e
·
verified ·
1 Parent(s): ef69df4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import sys
2
  import signal
3
  import warnings
@@ -20,18 +21,14 @@ from functools import lru_cache
20
  import json
21
  from concurrent.futures import ThreadPoolExecutor
22
 
23
-
24
- # Example usage
25
- warn("This is a user warning", UserWarning)
26
  # Security and configuration constants
27
  MAX_RETRIES = 3
28
  REQUEST_TIMEOUT = 30
29
  RATE_LIMIT_THRESHOLD = 10
30
  CACHE_TTL = 300 # 5 minutes cache
31
 
32
- class UserWarning:
33
  # Suppress warnings and set environment
34
- warnings.filterwarnings('ignore', category='UserWarning')
35
  os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
36
 
37
  class ConfigManager:
@@ -50,6 +47,9 @@ class ConfigManager:
50
  with open(config_file, 'w') as f:
51
  json.dump(config, f, indent=4)
52
 
 
 
 
53
  class SecurityManager:
54
  """Security management class"""
55
 
 
1
+
2
  import sys
3
  import signal
4
  import warnings
 
21
  import json
22
  from concurrent.futures import ThreadPoolExecutor
23
 
 
 
 
24
  # Security and configuration constants
25
  MAX_RETRIES = 3
26
  REQUEST_TIMEOUT = 30
27
  RATE_LIMIT_THRESHOLD = 10
28
  CACHE_TTL = 300 # 5 minutes cache
29
 
 
30
  # Suppress warnings and set environment
31
+ warnings.filterwarnings('ignore', category=User Warning)
32
  os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
33
 
34
  class ConfigManager:
 
47
  with open(config_file, 'w') as f:
48
  json.dump(config, f, indent=4)
49
 
50
+ # Example usage
51
+ warnings.warn("This is a user warning", UserWarning)
52
+
53
  class SecurityManager:
54
  """Security management class"""
55