Spaces:
Build error
Build error
Update app.py
Browse files12345682 unmodified lines899091929394123 unmodified lines218219220221222223import subprocesssubprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)import gradio as grimport torchimport base6482 unmodified linesdevice_map='auto')def generate_response(self, image: Image.Image, msg: str) -> str:inputs = self.processor.process(images=[image],123 unmodified linesexcept Exception as e:return "", f"Error generating captions: {str(e)}"def generate_image(images: List[Image.Image], prompt: str, negative_prompt: str, num_inference_steps: int, guidance_scale: float,denoise_mask: List[str], task_type: str, azimuth: str, elevation: str, distance: str, focal_length: float,height: int = 1024, width: int = 1024, scale_factor: float = 1.0, scale_watershed: float = 1.0,12345682 unmodified lines89909192939495123 unmodified lines219220221222223224225226import subprocesssubprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)import spacesimport gradio as grimport torchimport base6482 unmodified linesdevice_map='auto')@spaces.GPU(duration=120)def generate_response(self, image: Image.Image, msg: str) -> str:inputs = self.processor.process(images=[image],123 unmodified linesexcept Exception as e:return "", f"Error generating captions: {str(e)}"@spaces.GPU(duration=120)def generate_image(images: List[Image.Image], prompt: str, negative_prompt: str, num_inference_steps: int, guidance_scale: float,denoise_mask: List[str], task_type: str, azimuth: str, elevation: str, distance: str, focal_length: float,height: int = 1024, width: int = 1024, scale_factor: float = 1.0, scale_watershed: float = 1.0,
app.py+4-1