artificialguybr commited on
Commit
918f8d2
·
1 Parent(s): a33222d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -11
app.py CHANGED
@@ -32,11 +32,7 @@ def run_lora(prompt, weight):
32
  # Gradio UI
33
  print("Before Gradio Interface")
34
 
35
- title = gr.HTML(
36
- """<h1>LoRA the Explorer</h1>""",
37
- elem_id="title",
38
- name="title" # Add the name attribute
39
- )
40
 
41
  gallery = gr.Gallery(
42
  value=[(item["image"], item["title"]) for item in loras],
@@ -44,17 +40,16 @@ gallery = gr.Gallery(
44
  allow_preview=False,
45
  columns=3,
46
  elem_id="gallery",
47
- show_share_button=False,
48
- name="gallery" # Add the name attribute
49
  )
50
 
51
- prompt = gr.Textbox(label="Prompt", show_label=False, lines=1, max_lines=1, placeholder="Type a prompt after selecting a LoRA", elem_id="prompt", name="prompt") # Add the name attribute
52
 
53
- advanced_options = gr.Accordion("Advanced options", open=False, name="advanced_options") # Add the name attribute
54
 
55
- weight = gr.Slider(0, 10, value=1, step=0.1, label="LoRA weight", name="weight") # Add the name attribute
56
 
57
- result = gr.Image(interactive=False, label="Generated Image", elem_id="result-image", name="result") # Add the name attribute
58
 
59
  gr.Interface(
60
  fn=run_lora,
 
32
  # Gradio UI
33
  print("Before Gradio Interface")
34
 
35
+ title = gr.HTML("""<h1>LoRA the Explorer</h1>""", elem_id="title")
 
 
 
 
36
 
37
  gallery = gr.Gallery(
38
  value=[(item["image"], item["title"]) for item in loras],
 
40
  allow_preview=False,
41
  columns=3,
42
  elem_id="gallery",
43
+ show_share_button=False
 
44
  )
45
 
46
+ prompt = gr.Textbox(label="Prompt", show_label=False, lines=1, max_lines=1, placeholder="Type a prompt after selecting a LoRA", elem_id="prompt")
47
 
48
+ advanced_options = gr.Accordion("Advanced options", open=False)
49
 
50
+ weight = gr.Slider(0, 10, value=1, step=0.1, label="LoRA weight")
51
 
52
+ result = gr.Image(interactive=False, label="Generated Image", elem_id="result-image")
53
 
54
  gr.Interface(
55
  fn=run_lora,