from huggingface_hub import hf_hub_download , snapshot_download import pandas as pd import importlib import importlib.util import streamlit as st import sys import os # Define repo details REPO_ID = "wintergw/assignment_opt_gurobi" REPO_TYPE = "space" # Download specific files (if snapshot_download wasn't used) app_path = hf_hub_download( repo_id=REPO_ID, filename="app.py", repo_type=REPO_TYPE ) # Load and execute `app.py` spec_app = importlib.util.spec_from_file_location("app", app_path) app_module = importlib.util.module_from_spec(spec_app) spec_app.loader.exec_module(app_module)