#!/usr/bin/env python # coding: utf-8 # In[ ]: ##~ WIDGET CODE | BY: ANXETY ~## import os import json import ipywidgets as widgets from ipywidgets import widgets, Layout, Label, Button, VBox, HBox from IPython.display import display, HTML, Javascript, clear_output # ================= DETECT ENV ================= def detect_environment(): environments = { 'COLAB_GPU': ('Google Colab', "/content"), 'KAGGLE_URL_BASE': ('Kaggle', "/kaggle/working/content"), 'SAGEMAKER_INTERNAL_IMAGE_URI': ('SageMaker Studio Lab', "/home/studio-lab-user/content") } for env_var, (environment, path) in environments.items(): if env_var in os.environ: return environment, path env, root_path = detect_environment() webui_path = f"{root_path}/sdw" get_ipython().system('mkdir -p {root_path}') # ---------------------------------------------- # ==================== CSS JS ==================== CSS = ''' ''' display(HTML(CSS)) # ==================== CSS JS ==================== # ==================== WIDGETS ==================== # --- global widgets --- style = {'description_width': 'initial'} layout = widgets.Layout(min_width='1047px') HR = widgets.HTML('