liammatt5/GLAM_Web_App
0
1import os2 3# Limit thread overhead for memory-constrained environments4os.environ["OMP_NUM_THREADS"] = "1"5os.environ["MKL_NUM_THREADS"] = "1"6 7import matplotlib8matplotlib.use('Agg') # Force non-interactive backend to save RAM9 10import warnings11# Suppress specific Starlette/Gradio deprecation warnings regarding HTTP status codes12warnings.filterwarnings("ignore", message=".*HTTP_422_UNPROCESSABLE_ENTITY.*")13 14import gradio as gr15from ui import create_ui, css_styles16 17app = create_ui()18 19if __name__ == "__main__":20 host = "0.0.0.0"21 22 app.launch(23 share=False,24 server_name=host,25 server_port=int(os.environ.get("PORT", 7860)),26 theme=gr.themes.Soft(),27 css=css_styles28 )29 