acecalisto3 commited on
Commit
96808f1
·
verified ·
1 Parent(s): 7809074

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -17,9 +17,15 @@ import http.client
17
  import torch
18
  import deepspeed # Import DeepSpeed for ZeroGPU
19
 
20
- # Suppress warnings
21
- warnings.filterwarnings('ignore', category='UserWarning')
22
- os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
 
 
 
 
 
 
23
 
24
  def initialize_zero_gpu():
25
  """Initialize Hugging Face ZeroGPU"""
 
17
  import torch
18
  import deepspeed # Import DeepSpeed for ZeroGPU
19
 
20
+ # Define a custom warning class
21
+ class UserWarning(Warning):
22
+ pass
23
+
24
+ # Suppress your custom warning
25
+ warnings.filterwarnings('ignore', category=UserWarning)
26
+
27
+ # Example usage of the custom warning
28
+ warnings.warn("wrkarnd", UserWarning)
29
 
30
  def initialize_zero_gpu():
31
  """Initialize Hugging Face ZeroGPU"""