Spaces:
Running
on
Zero
Running
on
Zero
wanghaofan
commited on
Commit
•
5f2ba17
1
Parent(s):
2412442
Update app.py
Browse files
app.py
CHANGED
@@ -53,6 +53,7 @@ class calculateDuration:
|
|
53 |
def update_selection(evt: gr.SelectData, width, height):
|
54 |
selected_lora = loras[evt.index]
|
55 |
new_placeholder = f"Type a prompt for {selected_lora['title']}"
|
|
|
56 |
lora_repo = selected_lora["repo"]
|
57 |
updated_text = f"### Selected: [{lora_repo}](https://huggingface.co/{lora_repo}) ✨"
|
58 |
if "aspect" in selected_lora:
|
@@ -66,7 +67,8 @@ def update_selection(evt: gr.SelectData, width, height):
|
|
66 |
width = 1024
|
67 |
height = 1024
|
68 |
return (
|
69 |
-
gr.update(placeholder=new_placeholder),
|
|
|
70 |
updated_text,
|
71 |
evt.index,
|
72 |
width,
|
|
|
53 |
def update_selection(evt: gr.SelectData, width, height):
|
54 |
selected_lora = loras[evt.index]
|
55 |
new_placeholder = f"Type a prompt for {selected_lora['title']}"
|
56 |
+
prompt = selected_lora["prompt"]
|
57 |
lora_repo = selected_lora["repo"]
|
58 |
updated_text = f"### Selected: [{lora_repo}](https://huggingface.co/{lora_repo}) ✨"
|
59 |
if "aspect" in selected_lora:
|
|
|
67 |
width = 1024
|
68 |
height = 1024
|
69 |
return (
|
70 |
+
#gr.update(placeholder=new_placeholder),
|
71 |
+
prompt,
|
72 |
updated_text,
|
73 |
evt.index,
|
74 |
width,
|