Spaces:
Runtime error
Runtime error
Commit
Β·
9e2e3c5
1
Parent(s):
412aa2c
Try different models display code
Browse files
app.py
CHANGED
@@ -144,14 +144,17 @@ def random_seed():
|
|
144 |
return random.randint(0, 99999999999999) # <-- this is a random gradio limit, the seed range seems to actually be 0-18446744073709551615
|
145 |
|
146 |
|
147 |
-
# make markdown text for available models...
|
148 |
-
markdown_model_tags = [f"<{model}>" for model in model_tags if model != "ahx-model-1" and model != "ahx-model-2"]
|
149 |
-
markdown_model_text = "\n".join(markdown_model_tags)
|
150 |
|
151 |
-
|
152 |
-
|
153 |
-
|
|
|
154 |
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
|
157 |
with gr.Blocks(css=".gradio-container {max-width: 650px}") as dropdown_tab:
|
@@ -188,16 +191,15 @@ with gr.Blocks(css=".gradio-container {max-width: 650px}") as dropdown_tab:
|
|
188 |
output_text = gr.Text(elem_id="output-text")
|
189 |
# go_button.click(fn=image_prompt, inputs=[prompt, dropdown, guidance, steps, seed, height, width], outputs=[output, output_text])
|
190 |
go_button.click(fn=image_prompt, inputs=[prompt, guidance, steps, seed, height, width], outputs=[output, output_text])
|
191 |
-
gr.Markdown('''
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
''')
|
199 |
-
gr.Markdown(
|
200 |
-
gr.Markdown(markdown_betas_text)
|
201 |
|
202 |
|
203 |
# -----------------------------------------------------------------------------------------------
|
|
|
144 |
return random.randint(0, 99999999999999) # <-- this is a random gradio limit, the seed range seems to actually be 0-18446744073709551615
|
145 |
|
146 |
|
|
|
|
|
|
|
147 |
|
148 |
+
def get_models_text():
|
149 |
+
# make markdown text for available models...
|
150 |
+
markdown_model_tags = [f"<{model}>" for model in model_tags if model != "ahx-model-1" and model != "ahx-model-2"]
|
151 |
+
markdown_model_text = "\n".join(markdown_model_tags)
|
152 |
|
153 |
+
# make markdown text for available betas...
|
154 |
+
markdown_betas_tags = [f"<{model}>" for model in model_tags if "beta" in model]
|
155 |
+
markdown_betas_text = "\n".join(markdown_model_tags)
|
156 |
+
|
157 |
+
return f"## Available Artist Models / Concepts:\n" + markdown_model_text + "\n\n## Available Beta Models / Concepts:\n" + markdown_betas_text
|
158 |
|
159 |
|
160 |
with gr.Blocks(css=".gradio-container {max-width: 650px}") as dropdown_tab:
|
|
|
191 |
output_text = gr.Text(elem_id="output-text")
|
192 |
# go_button.click(fn=image_prompt, inputs=[prompt, dropdown, guidance, steps, seed, height, width], outputs=[output, output_text])
|
193 |
go_button.click(fn=image_prompt, inputs=[prompt, guidance, steps, seed, height, width], outputs=[output, output_text])
|
194 |
+
# gr.Markdown('''
|
195 |
+
# ## Prompt Examples Using Artist Tokens:
|
196 |
+
# * "an alien in the style of \<ahx-model-12>"
|
197 |
+
# * "a painting in the style of \<ahx-model-11>"
|
198 |
+
# * "a landscape in the style of \<ahx-model-10> and \<ahx-model-14> "
|
199 |
+
|
200 |
+
# ## Valid Artist Tokens:
|
201 |
+
# ''')
|
202 |
+
gr.Markdown(get_models_text())
|
|
|
203 |
|
204 |
|
205 |
# -----------------------------------------------------------------------------------------------
|