Spaces:
Running
Running
Commit
•
6531480
1
Parent(s):
437b70f
Update app.py
Browse files
app.py
CHANGED
@@ -107,17 +107,18 @@ def create_readme(info, downloaded_files, is_author=True, folder="."):
|
|
107 |
non_author_disclaimer = f'This model was originally uploaded on [CivitAI]({original_url}), by [{info["creator"]}](https://civitai.com/user/{info["creator"]}/models). The information below was provided by the author on CivitAI:'
|
108 |
default_tags = ["text-to-image", "stable-diffusion", "lora", "diffusers"]
|
109 |
civit_tags = [t for t in info["tags"] if t not in default_tags]
|
110 |
-
widget_prompts = "\n- text:".join(downloaded_files["imagePrompt"])
|
111 |
tags = default_tags + civit_tags
|
112 |
-
unpacked_tags = "\n-".join(tags)
|
113 |
content = f"""---
|
114 |
license: other
|
115 |
tags:
|
116 |
-
-{unpacked_tags}
|
|
|
117 |
base_model: stabilityai/stable-diffusion-xl-base-1.0
|
118 |
instance_prompt: {info['trainedWords'][0] if 'trainedWords' in info and len(info['trainedWords']) > 0 else ''}
|
119 |
widget:
|
120 |
-
- text:{widget_prompts}
|
121 |
---
|
122 |
|
123 |
# {info["name"]}
|
|
|
107 |
non_author_disclaimer = f'This model was originally uploaded on [CivitAI]({original_url}), by [{info["creator"]}](https://civitai.com/user/{info["creator"]}/models). The information below was provided by the author on CivitAI:'
|
108 |
default_tags = ["text-to-image", "stable-diffusion", "lora", "diffusers"]
|
109 |
civit_tags = [t for t in info["tags"] if t not in default_tags]
|
110 |
+
widget_prompts = "\n- text: ".join(downloaded_files["imagePrompt"])
|
111 |
tags = default_tags + civit_tags
|
112 |
+
unpacked_tags = "\n- ".join(tags)
|
113 |
content = f"""---
|
114 |
license: other
|
115 |
tags:
|
116 |
+
- {unpacked_tags}
|
117 |
+
|
118 |
base_model: stabilityai/stable-diffusion-xl-base-1.0
|
119 |
instance_prompt: {info['trainedWords'][0] if 'trainedWords' in info and len(info['trainedWords']) > 0 else ''}
|
120 |
widget:
|
121 |
+
- text: {widget_prompts}
|
122 |
---
|
123 |
|
124 |
# {info["name"]}
|