Spaces:
Sleeping
Sleeping
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=["/"]) |