Spaces:
Sleeping
Sleeping
gauravlochab
commited on
Commit
·
416df19
1
Parent(s):
4caa6e5
added quit
Browse files
app.py
CHANGED
|
@@ -28,24 +28,24 @@ from load_from_csv import (
|
|
| 28 |
get_data_freshness_info
|
| 29 |
)
|
| 30 |
|
| 31 |
-
#
|
| 32 |
logging.basicConfig(
|
| 33 |
-
level=logging.
|
| 34 |
-
format="%(
|
| 35 |
-
handlers=[
|
| 36 |
-
logging.StreamHandler() # Only console logging, no file logging
|
| 37 |
-
],
|
| 38 |
force=True
|
| 39 |
)
|
| 40 |
logger = logging.getLogger(__name__)
|
| 41 |
-
logger.setLevel(logging.
|
| 42 |
|
| 43 |
-
#
|
| 44 |
-
logging.getLogger("urllib3").setLevel(logging.
|
| 45 |
-
logging.getLogger("httpx").setLevel(logging.
|
| 46 |
-
logging.getLogger("matplotlib").setLevel(logging.
|
| 47 |
-
logging.getLogger("plotly").setLevel(logging.
|
| 48 |
-
logging.getLogger("pandas").setLevel(logging.
|
|
|
|
|
|
|
| 49 |
|
| 50 |
# Global variables to store the data for reuse
|
| 51 |
global_df = None
|
|
|
|
| 28 |
get_data_freshness_info
|
| 29 |
)
|
| 30 |
|
| 31 |
+
# Disable all logging for HF Spaces to prevent Content-Length errors
|
| 32 |
logging.basicConfig(
|
| 33 |
+
level=logging.CRITICAL, # Only show critical errors
|
| 34 |
+
format="%(message)s", # Minimal format
|
| 35 |
+
handlers=[], # No handlers to prevent any output
|
|
|
|
|
|
|
| 36 |
force=True
|
| 37 |
)
|
| 38 |
logger = logging.getLogger(__name__)
|
| 39 |
+
logger.setLevel(logging.CRITICAL)
|
| 40 |
|
| 41 |
+
# Disable all third-party library logging completely
|
| 42 |
+
logging.getLogger("urllib3").setLevel(logging.CRITICAL)
|
| 43 |
+
logging.getLogger("httpx").setLevel(logging.CRITICAL)
|
| 44 |
+
logging.getLogger("matplotlib").setLevel(logging.CRITICAL)
|
| 45 |
+
logging.getLogger("plotly").setLevel(logging.CRITICAL)
|
| 46 |
+
logging.getLogger("pandas").setLevel(logging.CRITICAL)
|
| 47 |
+
logging.getLogger("requests").setLevel(logging.CRITICAL)
|
| 48 |
+
logging.getLogger("gradio").setLevel(logging.CRITICAL)
|
| 49 |
|
| 50 |
# Global variables to store the data for reuse
|
| 51 |
global_df = None
|