Spaces:
Running
on
Zero
Running
on
Zero
more_pompt
Browse files- all_prompts_list.json +0 -0
- app.py +17 -1
- cellpose/__pycache__/__init__.cpython-312.pyc +0 -0
- cellpose/__pycache__/core.cpython-312.pyc +0 -0
- cellpose/__pycache__/dynamics.cpython-312.pyc +0 -0
- cellpose/__pycache__/dynamics.map_coordinates-414.py312.1.nbc +0 -0
- cellpose/__pycache__/dynamics.map_coordinates-414.py312.2.nbc +0 -0
- cellpose/__pycache__/dynamics.map_coordinates-414.py312.nbi +0 -0
- cellpose/__pycache__/io.cpython-312.pyc +0 -0
- cellpose/__pycache__/metrics.cpython-312.pyc +0 -0
- cellpose/__pycache__/models.cpython-312.pyc +0 -0
- cellpose/__pycache__/plot.cpython-312.pyc +0 -0
- cellpose/__pycache__/resnet_torch.cpython-312.pyc +0 -0
- cellpose/__pycache__/transforms.cpython-312.pyc +0 -0
- cellpose/__pycache__/utils.cpython-312.pyc +0 -0
- cellpose/__pycache__/version.cpython-312.pyc +0 -0
- models/__pycache__/controlnet.cpython-312.pyc +0 -0
- models/__pycache__/pipeline_controlnet.cpython-312.pyc +0 -0
- models/__pycache__/pipeline_ddpm_text_encoder.cpython-312.pyc +0 -0
- models/__pycache__/unet_2d.cpython-312.pyc +0 -0
- models/__pycache__/unet_2d_condition.cpython-312.pyc +0 -0
all_prompts_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
app.py
CHANGED
|
@@ -143,6 +143,15 @@ def numpy_to_pil(image_np, target_mode="RGB"):
|
|
| 143 |
elif target_mode == "L" and pil_image.mode != "L": pil_image = pil_image.convert("L")
|
| 144 |
return pil_image
|
| 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
# --- 1. Model Loading ---
|
| 147 |
print("--- Initializing FluoGen Application ---")
|
| 148 |
t2i_pipe, controlnet_pipe = None, None
|
|
@@ -508,7 +517,14 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 508 |
""") # Content hidden for brevity
|
| 509 |
with gr.Row(variant="panel"):
|
| 510 |
with gr.Column(scale=1, min_width=350):
|
| 511 |
-
t2i_prompt_input = gr.Dropdown(choices=T2I_PROMPTS, value=T2I_PROMPTS[0], label="Select a Prompt")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 512 |
t2i_steps_slider = gr.Slider(minimum=10, maximum=200, step=1, value=50, label="Inference Steps")
|
| 513 |
t2i_generate_button = gr.Button("Generate", variant="primary")
|
| 514 |
with gr.Column(scale=2):
|
|
|
|
| 143 |
elif target_mode == "L" and pil_image.mode != "L": pil_image = pil_image.convert("L")
|
| 144 |
return pil_image
|
| 145 |
|
| 146 |
+
def load_all_prompts():
|
| 147 |
+
try:
|
| 148 |
+
with open("all_prompts_list.json", "r", encoding="utf-8") as f:
|
| 149 |
+
return json.load(f)
|
| 150 |
+
except Exception as e:
|
| 151 |
+
print(f"Error loading prompts: {e}")
|
| 152 |
+
# 如果加载失败,返回几个默认值保底
|
| 153 |
+
return ["F-actin of COS-7", "ER of COS-7", "Mitochondria of BPAE"]
|
| 154 |
+
|
| 155 |
# --- 1. Model Loading ---
|
| 156 |
print("--- Initializing FluoGen Application ---")
|
| 157 |
t2i_pipe, controlnet_pipe = None, None
|
|
|
|
| 517 |
""") # Content hidden for brevity
|
| 518 |
with gr.Row(variant="panel"):
|
| 519 |
with gr.Column(scale=1, min_width=350):
|
| 520 |
+
# t2i_prompt_input = gr.Dropdown(choices=T2I_PROMPTS, value=T2I_PROMPTS[0], label="Select a Prompt")
|
| 521 |
+
t2i_prompt_input = gr.Dropdown(
|
| 522 |
+
choices=T2I_PROMPTS, # 传入那 3000 个词
|
| 523 |
+
value=T2I_PROMPTS[0], # 默认值
|
| 524 |
+
label="Search or Type a Prompt",
|
| 525 |
+
filterable=True, # 允许搜索/模糊匹配
|
| 526 |
+
allow_custom_value=True # 允许用户输入列表外的文字
|
| 527 |
+
)
|
| 528 |
t2i_steps_slider = gr.Slider(minimum=10, maximum=200, step=1, value=50, label="Inference Steps")
|
| 529 |
t2i_generate_button = gr.Button("Generate", variant="primary")
|
| 530 |
with gr.Column(scale=2):
|
cellpose/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/__init__.cpython-312.pyc and b/cellpose/__pycache__/__init__.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/core.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/core.cpython-312.pyc and b/cellpose/__pycache__/core.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/dynamics.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/dynamics.cpython-312.pyc and b/cellpose/__pycache__/dynamics.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/dynamics.map_coordinates-414.py312.1.nbc
CHANGED
|
Binary files a/cellpose/__pycache__/dynamics.map_coordinates-414.py312.1.nbc and b/cellpose/__pycache__/dynamics.map_coordinates-414.py312.1.nbc differ
|
|
|
cellpose/__pycache__/dynamics.map_coordinates-414.py312.2.nbc
CHANGED
|
Binary files a/cellpose/__pycache__/dynamics.map_coordinates-414.py312.2.nbc and b/cellpose/__pycache__/dynamics.map_coordinates-414.py312.2.nbc differ
|
|
|
cellpose/__pycache__/dynamics.map_coordinates-414.py312.nbi
CHANGED
|
Binary files a/cellpose/__pycache__/dynamics.map_coordinates-414.py312.nbi and b/cellpose/__pycache__/dynamics.map_coordinates-414.py312.nbi differ
|
|
|
cellpose/__pycache__/io.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/io.cpython-312.pyc and b/cellpose/__pycache__/io.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/metrics.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/metrics.cpython-312.pyc and b/cellpose/__pycache__/metrics.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/models.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/models.cpython-312.pyc and b/cellpose/__pycache__/models.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/plot.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/plot.cpython-312.pyc and b/cellpose/__pycache__/plot.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/resnet_torch.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/resnet_torch.cpython-312.pyc and b/cellpose/__pycache__/resnet_torch.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/transforms.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/transforms.cpython-312.pyc and b/cellpose/__pycache__/transforms.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/utils.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/utils.cpython-312.pyc and b/cellpose/__pycache__/utils.cpython-312.pyc differ
|
|
|
cellpose/__pycache__/version.cpython-312.pyc
CHANGED
|
Binary files a/cellpose/__pycache__/version.cpython-312.pyc and b/cellpose/__pycache__/version.cpython-312.pyc differ
|
|
|
models/__pycache__/controlnet.cpython-312.pyc
ADDED
|
Binary file (22.6 kB). View file
|
|
|
models/__pycache__/pipeline_controlnet.cpython-312.pyc
ADDED
|
Binary file (4.87 kB). View file
|
|
|
models/__pycache__/pipeline_ddpm_text_encoder.cpython-312.pyc
ADDED
|
Binary file (6.6 kB). View file
|
|
|
models/__pycache__/unet_2d.cpython-312.pyc
ADDED
|
Binary file (15.1 kB). View file
|
|
|
models/__pycache__/unet_2d_condition.cpython-312.pyc
ADDED
|
Binary file (8.76 kB). View file
|
|
|