Spaces:
Runtime error
Runtime error
artificialguybr
commited on
Commit
•
3733cf2
1
Parent(s):
c844bfe
Update app.py
Browse files
app.py
CHANGED
@@ -20,10 +20,10 @@ def update_selection(selected_state: gr.SelectData):
|
|
20 |
selected_lora = loras[selected_lora_index]
|
21 |
new_placeholder = f"Type a prompt for {selected_lora['title']}"
|
22 |
lora_repo = selected_lora["repo"]
|
23 |
-
updated_text = f"Selected: [{lora_repo}](https://huggingface.co/{lora_repo}) ✨"
|
24 |
return (
|
25 |
gr.update(placeholder=new_placeholder),
|
26 |
-
updated_text, # Retorna o texto atualizado
|
27 |
selected_state
|
28 |
)
|
29 |
|
@@ -90,7 +90,7 @@ with gr.Blocks(css="custom.css") as app:
|
|
90 |
)
|
91 |
with gr.Column():
|
92 |
prompt_title = gr.Markdown("### Click on a LoRA in the gallery to select it")
|
93 |
-
selected_info = gr.
|
94 |
with gr.Row():
|
95 |
prompt = gr.Textbox(label="Prompt", show_label=False, lines=1, max_lines=1, placeholder="Type a prompt after selecting a LoRA")
|
96 |
button = gr.Button("Run")
|
|
|
20 |
selected_lora = loras[selected_lora_index]
|
21 |
new_placeholder = f"Type a prompt for {selected_lora['title']}"
|
22 |
lora_repo = selected_lora["repo"]
|
23 |
+
updated_text = f"### Selected: [{lora_repo}](https://huggingface.co/{lora_repo}) ✨"
|
24 |
return (
|
25 |
gr.update(placeholder=new_placeholder),
|
26 |
+
updated_text, # Retorna o texto Markdown atualizado
|
27 |
selected_state
|
28 |
)
|
29 |
|
|
|
90 |
)
|
91 |
with gr.Column():
|
92 |
prompt_title = gr.Markdown("### Click on a LoRA in the gallery to select it")
|
93 |
+
selected_info = gr.Markdown("") # Novo componente Markdown para exibir o texto da LoRA selecionada
|
94 |
with gr.Row():
|
95 |
prompt = gr.Textbox(label="Prompt", show_label=False, lines=1, max_lines=1, placeholder="Type a prompt after selecting a LoRA")
|
96 |
button = gr.Button("Run")
|