Spaces:
Sleeping
Sleeping
Suppress harmless asyncio cleanup warnings
Browse files
app.py
CHANGED
|
@@ -6,12 +6,16 @@ This app allows you to run STARFlow inference on Hugging Face GPU infrastructure
|
|
| 6 |
"""
|
| 7 |
|
| 8 |
import os
|
|
|
|
| 9 |
import gradio as gr
|
| 10 |
import torch
|
| 11 |
import subprocess
|
| 12 |
import pathlib
|
| 13 |
from pathlib import Path
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
# Fix OpenMP warning
|
| 16 |
os.environ['OMP_NUM_THREADS'] = '1'
|
| 17 |
|
|
|
|
| 6 |
"""
|
| 7 |
|
| 8 |
import os
|
| 9 |
+
import warnings
|
| 10 |
import gradio as gr
|
| 11 |
import torch
|
| 12 |
import subprocess
|
| 13 |
import pathlib
|
| 14 |
from pathlib import Path
|
| 15 |
|
| 16 |
+
# Suppress harmless warnings
|
| 17 |
+
warnings.filterwarnings("ignore", category=FutureWarning, message=".*torch.distributed.reduce_op.*")
|
| 18 |
+
|
| 19 |
# Fix OpenMP warning
|
| 20 |
os.environ['OMP_NUM_THREADS'] = '1'
|
| 21 |
|