artificialguybr
commited on
Commit
·
7ea1b80
1
Parent(s):
a166abf
Update app.py
Browse files
app.py
CHANGED
@@ -23,10 +23,11 @@ def update_selection(selected_state: gr.SelectData):
|
|
23 |
updated_text = f"### Selected: [{lora_repo}](https://huggingface.co/{lora_repo}) ✨"
|
24 |
return (
|
25 |
gr.update(placeholder=new_placeholder),
|
26 |
-
|
27 |
selected_state
|
28 |
)
|
29 |
|
|
|
30 |
def run_lora(prompt, selected_state, progress=gr.Progress(track_tqdm=True)):
|
31 |
logging.debug(f"Inside run_lora, selected_state: {selected_state}")
|
32 |
if not selected_state:
|
@@ -89,7 +90,7 @@ with gr.Blocks(css="custom.css") as app:
|
|
89 |
)
|
90 |
with gr.Column():
|
91 |
prompt_title = gr.Markdown("### Click on a LoRA in the gallery to select it")
|
92 |
-
selected_info = gr.
|
93 |
with gr.Row():
|
94 |
prompt = gr.Textbox(label="Prompt", show_label=False, lines=1, max_lines=1, placeholder="Type a prompt after selecting a LoRA")
|
95 |
button = gr.Button("Run")
|
|
|
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 |
|
30 |
+
|
31 |
def run_lora(prompt, selected_state, progress=gr.Progress(track_tqdm=True)):
|
32 |
logging.debug(f"Inside run_lora, selected_state: {selected_state}")
|
33 |
if not selected_state:
|
|
|
90 |
)
|
91 |
with gr.Column():
|
92 |
prompt_title = gr.Markdown("### Click on a LoRA in the gallery to select it")
|
93 |
+
selected_info = gr.Output() # Usa um componente Output em vez de Markdown
|
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")
|