Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
0c723a3
1
Parent(s):
0af7ad6
22
Browse files
app.py
CHANGED
|
@@ -88,7 +88,7 @@ def generate_lora(
|
|
| 88 |
|
| 89 |
save_file(lora, lora_path)
|
| 90 |
|
| 91 |
-
return lora_path, lora_path, gr.
|
| 92 |
|
| 93 |
@spaces.GPU
|
| 94 |
def generate_image(
|
|
@@ -125,7 +125,6 @@ h3{
|
|
| 125 |
|
| 126 |
with open('examples/0_examples.json', 'r') as file: examples = json.load(file)
|
| 127 |
with gr.Blocks() as demo:
|
| 128 |
-
has_lora = gr.State(False)
|
| 129 |
with gr.Column(elem_id="col-container"):
|
| 130 |
with gr.Column():
|
| 131 |
gr.HTML(read_file("static/header.html"))
|
|
@@ -143,8 +142,8 @@ with gr.Blocks() as demo:
|
|
| 143 |
|
| 144 |
with gr.Column():
|
| 145 |
lora_path = gr.Textbox(label="Generated LoRA path",lines=2, interactive=False)
|
| 146 |
-
lora_download = gr.DownloadButton(label=f"Download LoRA", visible=
|
| 147 |
-
with gr.
|
| 148 |
gr.Markdown("### After your LoRA is ready, you can try generate image here.")
|
| 149 |
with gr.Row():
|
| 150 |
with gr.Column():
|
|
@@ -212,7 +211,7 @@ with gr.Blocks() as demo:
|
|
| 212 |
inputs=[
|
| 213 |
input_images
|
| 214 |
],
|
| 215 |
-
outputs=[lora_path, lora_download],
|
| 216 |
)
|
| 217 |
|
| 218 |
|
|
|
|
| 88 |
|
| 89 |
save_file(lora, lora_path)
|
| 90 |
|
| 91 |
+
return lora_path, lora_path, gr.update(visible=True), gr.update(visible=True)
|
| 92 |
|
| 93 |
@spaces.GPU
|
| 94 |
def generate_image(
|
|
|
|
| 125 |
|
| 126 |
with open('examples/0_examples.json', 'r') as file: examples = json.load(file)
|
| 127 |
with gr.Blocks() as demo:
|
|
|
|
| 128 |
with gr.Column(elem_id="col-container"):
|
| 129 |
with gr.Column():
|
| 130 |
gr.HTML(read_file("static/header.html"))
|
|
|
|
| 142 |
|
| 143 |
with gr.Column():
|
| 144 |
lora_path = gr.Textbox(label="Generated LoRA path",lines=2, interactive=False)
|
| 145 |
+
lora_download = gr.DownloadButton(label=f"Download LoRA", visible=False)
|
| 146 |
+
with gr.Column(visible=False) as imagen_container:
|
| 147 |
gr.Markdown("### After your LoRA is ready, you can try generate image here.")
|
| 148 |
with gr.Row():
|
| 149 |
with gr.Column():
|
|
|
|
| 211 |
inputs=[
|
| 212 |
input_images
|
| 213 |
],
|
| 214 |
+
outputs=[lora_path, lora_download, imagen_container],
|
| 215 |
)
|
| 216 |
|
| 217 |
|