Spaces:
Paused
Paused
Commit
β’
09de898
1
Parent(s):
67918ee
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,8 @@ with open("sdxl_loras.json", "r") as file:
|
|
21 |
"weights": item["weights"],
|
22 |
"is_compatible": item["is_compatible"],
|
23 |
"is_pivotal": item.get("is_pivotal", False),
|
24 |
-
"text_embedding_weights": item.get("text_embedding_weights", None)
|
|
|
25 |
}
|
26 |
for item in data
|
27 |
]
|
@@ -52,7 +53,7 @@ def update_selection(selected_state: gr.SelectData):
|
|
52 |
instance_prompt = sdxl_loras[selected_state.index]["trigger_word"]
|
53 |
new_placeholder = "Type a prompt. This LoRA applies for all prompts, no need for a trigger word" if instance_prompt == "" else "Type a prompt to use your selected LoRA"
|
54 |
weight_name = sdxl_loras[selected_state.index]["weights"]
|
55 |
-
updated_text = f"### Selected: [{lora_repo}](https://huggingface.co/{lora_repo}) β¨"
|
56 |
is_compatible = sdxl_loras[selected_state.index]["is_compatible"]
|
57 |
is_pivotal = sdxl_loras[selected_state.index]["is_pivotal"]
|
58 |
|
|
|
21 |
"weights": item["weights"],
|
22 |
"is_compatible": item["is_compatible"],
|
23 |
"is_pivotal": item.get("is_pivotal", False),
|
24 |
+
"text_embedding_weights": item.get("text_embedding_weights", None),
|
25 |
+
"is_nc": item.get("non_commercial", False)
|
26 |
}
|
27 |
for item in data
|
28 |
]
|
|
|
53 |
instance_prompt = sdxl_loras[selected_state.index]["trigger_word"]
|
54 |
new_placeholder = "Type a prompt. This LoRA applies for all prompts, no need for a trigger word" if instance_prompt == "" else "Type a prompt to use your selected LoRA"
|
55 |
weight_name = sdxl_loras[selected_state.index]["weights"]
|
56 |
+
updated_text = f"### Selected: [{lora_repo}](https://huggingface.co/{lora_repo}) β¨ {'(non-commercial LoRA, `cc-by-nc`)' if sdxl_loras[selected_state.index]['is_nc'] else '' }"
|
57 |
is_compatible = sdxl_loras[selected_state.index]["is_compatible"]
|
58 |
is_pivotal = sdxl_loras[selected_state.index]["is_pivotal"]
|
59 |
|