Shri Jayaram commited on
Commit
37ca6d4
·
1 Parent(s): c8282e4

import err fix

Browse files
Files changed (1) hide show
  1. florence.py +2 -2
florence.py CHANGED
@@ -17,11 +17,11 @@ FLORENCE_DENSE_REGION_CAPTION_TASK = '<DENSE_REGION_CAPTION>'
17
 
18
 
19
  def fixed_get_imports(filename: Union[str, os.PathLike]) -> list[str]:
20
- """Work around for https://huggingface.co/microsoft/phi-1_5/discussions/72."""
21
  if not str(filename).endswith("/modeling_florence2.py"):
22
  return get_imports(filename)
23
  imports = get_imports(filename)
24
- imports.remove("flash_attn")
 
25
  return imports
26
 
27
 
 
17
 
18
 
19
  def fixed_get_imports(filename: Union[str, os.PathLike]) -> list[str]:
 
20
  if not str(filename).endswith("/modeling_florence2.py"):
21
  return get_imports(filename)
22
  imports = get_imports(filename)
23
+ if "flash_attn" in imports:
24
+ imports.remove("flash_attn")
25
  return imports
26
 
27