Spaces:
Running
on
Zero
Running
on
Zero
import os | |
from typing import Union | |
from transformers.dynamic_module_utils import get_imports | |
def fixed_get_imports(filename: Union[str, os.PathLike]) -> list[str]: | |
"""Work around for https://huggingface.co/microsoft/phi-1_5/discussions/72.""" | |
if not str(filename).endswith("/modeling_florence2.py"): | |
return get_imports(filename) | |
imports = get_imports(filename) | |
imports.remove("flash_attn") | |
return imports | |