Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,9 +4,13 @@ import os
|
|
| 4 |
import tempfile
|
| 5 |
import time
|
| 6 |
import re
|
|
|
|
| 7 |
from typing import Optional, Tuple
|
| 8 |
from datetime import datetime
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
# Safe matplotlib backend for Hugging Face Spaces
|
| 11 |
import matplotlib
|
| 12 |
matplotlib.use('Agg')
|
|
@@ -692,7 +696,7 @@ if __name__ == "__main__":
|
|
| 692 |
server_port=7860,
|
| 693 |
show_error=True,
|
| 694 |
quiet=False,
|
|
|
|
| 695 |
theme=getattr(app_instance, 'theme', None),
|
| 696 |
css=getattr(app_instance, 'custom_css', None)
|
| 697 |
-
)
|
| 698 |
-
|
|
|
|
| 4 |
import tempfile
|
| 5 |
import time
|
| 6 |
import re
|
| 7 |
+
import warnings
|
| 8 |
from typing import Optional, Tuple
|
| 9 |
from datetime import datetime
|
| 10 |
|
| 11 |
+
# Suppress harmless FutureWarnings from torch/spaces
|
| 12 |
+
warnings.filterwarnings("ignore", category=FutureWarning)
|
| 13 |
+
|
| 14 |
# Safe matplotlib backend for Hugging Face Spaces
|
| 15 |
import matplotlib
|
| 16 |
matplotlib.use('Agg')
|
|
|
|
| 696 |
server_port=7860,
|
| 697 |
show_error=True,
|
| 698 |
quiet=False,
|
| 699 |
+
ssr_mode=False,
|
| 700 |
theme=getattr(app_instance, 'theme', None),
|
| 701 |
css=getattr(app_instance, 'custom_css', None)
|
| 702 |
+
)
|
|
|