Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
artificialguybr
commited on
Commit
•
c844bfe
1
Parent(s):
5830189
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"
|
24 |
return (
|
25 |
gr.update(placeholder=new_placeholder),
|
26 |
-
updated_text, # Retorna o texto
|
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 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.Textbox(readonly=True, lines=1) # Usa um Textbox como componente de saída
|
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")
|