diff --git a/agent/integration/huggingface.py b/agent/integration/huggingface.py index dfafb12..fba9743 100644 --- a/agent/integration/huggingface.py +++ b/agent/integration/huggingface.py @@ -1,7 +1,3 @@ -import huggingface_hub as hf -from huggingface_hub import HfApi, ModelFilter - - def download_readme(model_id): """ Download the README of the specified model. @@ -12,6 +8,7 @@ def download_readme(model_id): Returns: str: The README content of the specified model. """ + import huggingface_hub as hf try: file_path = hf.hf_hub_download(model_id, 'README.md') with open(file_path, 'r', encoding='utf-8') as file: @@ -41,6 +38,8 @@ def get_top_downloaded_models( Returns: list: A list of the top-downloaded model ids. """ + + from huggingface_hub import HfApi, ModelFilter api = HfApi() try: diff --git a/requirements.txt b/requirements.txt index cac4d60..fadaf4d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,7 @@ tinydb pyyaml uvicorn fastapi +requests questionary prompt_toolkit pandas~=2.2.2 diff --git a/setup.py b/setup.py index ae44730..f8a3a4b 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ def readme(): ] }, package_data={ - 'steps': ['agent/templates/*.yml'] + 'steps': ['agent/hub/*.yml'] }, zip_safe=False, include_package_data=True,