File size: 498 Bytes
bdf9962
fc91aa0
bdf9962
 
 
fa851d1
bdf9962
fc91aa0
 
 
 
fa851d1
bdf9962
 
fc91aa0
bdf9962
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import spaces
import torch
from model_loader import load_model_and_processor
from image_generator import process_and_generate
from gradio_interface import create_gradio_interface

if __name__ == "__main__":
    import subprocess
    subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)




    # Create and launch the Gradio interface
    demo = create_gradio_interface(process_and_generate)
    demo.launch(allowed_paths=["/"])