prithivMLmods commited on
Commit
20ef3fc
·
verified ·
1 Parent(s): 577e0a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
  import numpy as np
3
- import spaces # This is a special module for Hugging Face Spaces, not needed for local execution
4
  import torch
5
  import random
6
  import json
@@ -123,6 +123,8 @@ def infer_with_lora(input_image, prompt, selected_index, seed=0, guidance_scale=
123
 
124
  # CSS styling
125
  css = """
 
 
126
  #main_app {
127
  display: flex;
128
  gap: 20px;
@@ -165,15 +167,13 @@ css = """
165
  """
166
 
167
  # Create Gradio interface
168
- with gr.Blocks(css=css, theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Lexend Deca"), "sans-serif"])) as demo:
169
  gr_flux_loras = gr.State(value=flux_loras_raw)
170
 
171
  title = gr.HTML(
172
- """<h1><img src="https://huggingface.co/spaces/kontext-community/FLUX.1-Kontext-portrait/resolve/main/dora_kontext.png" alt="LoRA"> Kontext-Style LoRA Explorer</h1>""",
173
  elem_id="title",
174
  )
175
- gr.Markdown("A demo for the style LoRAs from the [Kontext-Style](https://huggingface.co/Kontext-Style) 🤗")
176
-
177
  selected_state = gr.State(value=None)
178
  # The following states are no longer used by the simplified logic but kept for component structure
179
  custom_loaded_lora = gr.State(value=None)
@@ -216,7 +216,7 @@ with gr.Blocks(css=css, theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Lexend
216
  placeholder="opt - describe the person/subject, e.g. 'a man with glasses and a beard'",
217
  elem_id="prompt"
218
  )
219
- run_button = gr.Button("Generate", elem_id="run_button")
220
 
221
  result = gr.Image(label="Generated Image", interactive=False, height=512)
222
 
 
1
  import gradio as gr
2
  import numpy as np
3
+ import spaces
4
  import torch
5
  import random
6
  import json
 
123
 
124
  # CSS styling
125
  css = """
126
+ #gen_btn{height: 100%}
127
+ #gen_column{align-self: stretch}
128
  #main_app {
129
  display: flex;
130
  gap: 20px;
 
167
  """
168
 
169
  # Create Gradio interface
170
+ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
171
  gr_flux_loras = gr.State(value=flux_loras_raw)
172
 
173
  title = gr.HTML(
174
+ """<h1>FLUX Kontext Super LoRAs🖖</h1>""",
175
  elem_id="title",
176
  )
 
 
177
  selected_state = gr.State(value=None)
178
  # The following states are no longer used by the simplified logic but kept for component structure
179
  custom_loaded_lora = gr.State(value=None)
 
216
  placeholder="opt - describe the person/subject, e.g. 'a man with glasses and a beard'",
217
  elem_id="prompt"
218
  )
219
+ run_button = gr.Button("Generate", variant="primary", elem_id="gen_btn")
220
 
221
  result = gr.Image(label="Generated Image", interactive=False, height=512)
222