Spaces:
Running
Running
Update app2.py
Browse files
app2.py
CHANGED
@@ -400,12 +400,19 @@ def generate_qr(json_data):
|
|
400 |
return qr_path
|
401 |
return None
|
402 |
|
|
|
403 |
# Configure system settings
|
404 |
mimetypes.init()
|
405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
# Create and launch interface
|
407 |
interface = create_interface()
|
408 |
-
|
409 |
# Launch with proper configuration
|
410 |
interface.launch(
|
411 |
server_name="0.0.0.0",
|
@@ -415,5 +422,8 @@ def generate_qr(json_data):
|
|
415 |
inbrowser=True,
|
416 |
debug=True
|
417 |
)
|
|
|
|
|
418 |
if __name__ == "__main__":
|
419 |
-
main()
|
|
|
|
400 |
return qr_path
|
401 |
return None
|
402 |
|
403 |
+
def main():
|
404 |
# Configure system settings
|
405 |
mimetypes.init()
|
406 |
+
|
407 |
+
# Check network connectivity
|
408 |
+
network_ok, network_results = check_network_connectivity()
|
409 |
+
if not network_ok:
|
410 |
+
logger.warning("Network connectivity issues detected. Some features may not work properly.")
|
411 |
+
for result in network_results:
|
412 |
+
logger.warning(f"Test site {result['site']}: {result['status']}")
|
413 |
# Create and launch interface
|
414 |
interface = create_interface()
|
415 |
+
|
416 |
# Launch with proper configuration
|
417 |
interface.launch(
|
418 |
server_name="0.0.0.0",
|
|
|
422 |
inbrowser=True,
|
423 |
debug=True
|
424 |
)
|
425 |
+
|
426 |
+
|
427 |
if __name__ == "__main__":
|
428 |
+
main()
|
429 |
+
|