Created
August 31, 2024 17:26
-
-
Save adamelliotfields/f6eb46468949fde6b3f246d7ecaf5c00 to your computer and use it in GitHub Desktop.
Import a Python module from a Hugging Face repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://hf.co/spaces/briaai/BRIA-2.3-T5/blob/main/app.py | |
import sys | |
from huggingface_hub import snapshot_download | |
repo_path = snapshot_download(repo_id="org/repo") | |
sys.path.append(repo_path) | |
from my_module import my_function # my_module.py | |
from my_other_module import my_other_function # my_other_module.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment