Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -116,7 +116,6 @@ def get_model():
|
|
| 116 |
# 3) Instruction templates & options
|
| 117 |
# ------------------------------
|
| 118 |
STYLE_OPTIONS = [
|
| 119 |
-
STYLE_OPTIONS = [
|
| 120 |
"Descriptive",
|
| 121 |
"Character training",
|
| 122 |
"Flux.1-Dev",
|
|
@@ -128,7 +127,7 @@ STYLE_OPTIONS = [
|
|
| 128 |
"Art analysis (no artist names)",
|
| 129 |
"Social caption",
|
| 130 |
"Aesthetic tags (comma-sep)"
|
| 131 |
-
]
|
| 132 |
|
| 133 |
CAPTION_TYPE_MAP: Dict[str, str] = {
|
| 134 |
"Descriptive": "Write a detailed description for this image.",
|
|
@@ -907,13 +906,16 @@ with gr.Blocks(css=BASE_CSS, title="ForgeCaptions") as demo:
|
|
| 907 |
# RIGHT: instructions + dataset + general sliders + logo controls
|
| 908 |
with gr.Column(scale=1):
|
| 909 |
with gr.Accordion("Model Instructions", open=False):
|
| 910 |
-
instruction_preview = gr.Textbox(
|
| 911 |
-
|
| 912 |
-
|
| 913 |
-
|
| 914 |
-
|
| 915 |
-
|
| 916 |
-
|
|
|
|
|
|
|
|
|
|
| 917 |
dataset_name = gr.Textbox(label="Dataset name (export title prefix)",
|
| 918 |
value=settings.get("dataset_name", "forgecaptions"))
|
| 919 |
max_side = gr.Slider(256, 1024, settings.get("max_side", 896), step=32, label="Max side (resize)")
|
|
|
|
| 116 |
# 3) Instruction templates & options
|
| 117 |
# ------------------------------
|
| 118 |
STYLE_OPTIONS = [
|
|
|
|
| 119 |
"Descriptive",
|
| 120 |
"Character training",
|
| 121 |
"Flux.1-Dev",
|
|
|
|
| 127 |
"Art analysis (no artist names)",
|
| 128 |
"Social caption",
|
| 129 |
"Aesthetic tags (comma-sep)"
|
| 130 |
+
]
|
| 131 |
|
| 132 |
CAPTION_TYPE_MAP: Dict[str, str] = {
|
| 133 |
"Descriptive": "Write a detailed description for this image.",
|
|
|
|
| 906 |
# RIGHT: instructions + dataset + general sliders + logo controls
|
| 907 |
with gr.Column(scale=1):
|
| 908 |
with gr.Accordion("Model Instructions", open=False):
|
| 909 |
+
instruction_preview = gr.Textbox(
|
| 910 |
+
label=None,
|
| 911 |
+
lines=12,
|
| 912 |
+
value=final_instruction(
|
| 913 |
+
settings.get("styles", ["Character training"]),
|
| 914 |
+
settings.get("extras", []),
|
| 915 |
+
settings.get("name",""),
|
| 916 |
+
settings.get("caption_length", "long"),
|
| 917 |
+
),
|
| 918 |
+
)
|
| 919 |
dataset_name = gr.Textbox(label="Dataset name (export title prefix)",
|
| 920 |
value=settings.get("dataset_name", "forgecaptions"))
|
| 921 |
max_side = gr.Slider(256, 1024, settings.get("max_side", 896), step=32, label="Max side (resize)")
|