DigiP-AI commited on
Commit
d0b5531
·
verified ·
1 Parent(s): 9a5638a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -37,7 +37,7 @@ def clear():
37
  return None
38
 
39
  def change_tab():
40
- return gr.Tabs.update(selected=0)
41
 
42
  def query(lora_id, prompt, is_negative=False, steps=28, cfg_scale=3.5, sampler="DPM++ 2M Karras", seed=-1, strength=100, width=896, height=1152):
43
  if prompt == "" or prompt == None:
@@ -160,18 +160,20 @@ def feifeichat(image):
160
 
161
 
162
  css = """
 
163
  #app-container {
164
  max-width: 930px;
165
  margin-left: auto;
166
  margin-right: auto;
167
  }
168
- ".gradio-container {background: url('file=abstract.jpg')}
169
 
170
  """
171
  with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
172
  gr.HTML("<center><h6>🎨 FLUX.1-Dev with LoRA 🇬🇧</h6></center>")
 
173
  with gr.Tabs() as tabs:
174
- with gr.TabItem(label="Image To Prompt", visible=True, id=0):
175
  with gr.Row():
176
  with gr.Column():
177
  input_img = gr.Image(label="Input Picture 🖼️",height=320,type="filepath")
@@ -183,7 +185,7 @@ with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
183
 
184
  submit_btn.click(feifeichat, [input_img], [output_text])
185
 
186
- with gr.TabItem(label="Text to Image", visible=True, id=1):
187
  with gr.Column(elem_id="app-container"):
188
  with gr.Row():
189
  with gr.Column(elem_id="prompt-container"):
 
37
  return None
38
 
39
  def change_tab():
40
+ return gr.Tabs.update(selected=1)
41
 
42
  def query(lora_id, prompt, is_negative=False, steps=28, cfg_scale=3.5, sampler="DPM++ 2M Karras", seed=-1, strength=100, width=896, height=1152):
43
  if prompt == "" or prompt == None:
 
160
 
161
 
162
  css = """
163
+ footer{display:none !important}
164
  #app-container {
165
  max-width: 930px;
166
  margin-left: auto;
167
  margin-right: auto;
168
  }
169
+
170
 
171
  """
172
  with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
173
  gr.HTML("<center><h6>🎨 FLUX.1-Dev with LoRA 🇬🇧</h6></center>")
174
+
175
  with gr.Tabs() as tabs:
176
+ with gr.TabItem(label="Image To Prompt", visible=True, id=1):
177
  with gr.Row():
178
  with gr.Column():
179
  input_img = gr.Image(label="Input Picture 🖼️",height=320,type="filepath")
 
185
 
186
  submit_btn.click(feifeichat, [input_img], [output_text])
187
 
188
+ with gr.TabItem(label="Text to Image", visible=True, id=0):
189
  with gr.Column(elem_id="app-container"):
190
  with gr.Row():
191
  with gr.Column(elem_id="prompt-container"):