Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,8 @@ import gradio as gr
|
|
26 |
import string
|
27 |
import random, time, math
|
28 |
|
29 |
-
|
|
|
30 |
# from src.flux.pipeline_tools import CustomFluxPipeline, load_modulation_adapter, load_dit_lora
|
31 |
# from src.utils.data_utils import get_train_config, image_grid, pil2tensor, json_dump, pad_to_square, cv2pil, merge_bboxes
|
32 |
# from eval.tools.face_id import FaceID
|
@@ -396,6 +397,9 @@ def update_inputs(is_open, index, state: list):
|
|
396 |
return indexs, is_open
|
397 |
|
398 |
if __name__ == "__main__":
|
|
|
|
|
|
|
399 |
with gr.Blocks() as demo:
|
400 |
|
401 |
indexs_state = gr.State([0, 1]) # 添加状态来存储 indexs
|
|
|
26 |
import string
|
27 |
import random, time, math
|
28 |
|
29 |
+
def load_stuff():
|
30 |
+
from src.flux.generate import generate_from_test_sample, seed_everything
|
31 |
# from src.flux.pipeline_tools import CustomFluxPipeline, load_modulation_adapter, load_dit_lora
|
32 |
# from src.utils.data_utils import get_train_config, image_grid, pil2tensor, json_dump, pad_to_square, cv2pil, merge_bboxes
|
33 |
# from eval.tools.face_id import FaceID
|
|
|
397 |
return indexs, is_open
|
398 |
|
399 |
if __name__ == "__main__":
|
400 |
+
|
401 |
+
load_stuff()
|
402 |
+
|
403 |
with gr.Blocks() as demo:
|
404 |
|
405 |
indexs_state = gr.State([0, 1]) # 添加状态来存储 indexs
|