DigiP-AI commited on
Commit
e6317d6
·
verified ·
1 Parent(s): 1a72e78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -19
app.py CHANGED
@@ -7,11 +7,6 @@ import io
7
  import base64
8
  import random
9
  from transforms import RGBTransform # from source code mentioned above
10
- from theme import theme
11
-
12
- from fastapi import FastAPI
13
-
14
- app = FastAPI()
15
 
16
 
17
  loaded_model=[]
@@ -172,28 +167,19 @@ height:100%;
172
  min-width:200px;
173
  }
174
  """
175
- with gr.Blocks(css=css, theme=theme) as app:
176
  with gr.Row():
177
  with gr.Column():
178
  inp=gr.Textbox(label="Prompt")
179
  btn=gr.Button()
180
  with gr.Column():
181
- with gr.Accordion("Advanced options", open=False):
182
- col = gr.ColorPicker(label="Color Tint")
183
- tint = gr.Slider(label="Tint Strength", minimum=0, maximum=1, step=0.01, value=0.30)
184
- width = gr.Slider(label="Width", info="If 0, the default value is used.", maximum=1216, step=32, value=896)
185
- height = gr.Slider(label="Height", info="If 0, the default value is used.", maximum=1216, step=32, value=1152)
186
- with gr.Row():
187
- steps = gr.Slider(label="Number of inference steps", info="If 0, the default value is used.", maximum=100, step=1, value=50)
188
- cfg = gr.Slider(label="Guidance scale", info="If 0, the default value is used.", maximum=100, step=0.1, value=100)
189
  with gr.Row():
190
  model_drop=gr.Dropdown(label="Models", choices=models, type='index', value=models[0])
191
  cnt = gr.Number(value=1)
192
  out_html=gr.HTML()
193
  outp=gr.Gallery()
194
  btn.click(run_dif_color,[inp,model_drop,cnt,col,tint],[outp,out_html])
195
- app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
196
-
197
- if __name__ == "__main__":
198
- timeout = 100
199
- app.launch(show_api=False, share=False)
 
7
  import base64
8
  import random
9
  from transforms import RGBTransform # from source code mentioned above
 
 
 
 
 
10
 
11
 
12
  loaded_model=[]
 
167
  min-width:200px;
168
  }
169
  """
170
+ with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as app:
171
  with gr.Row():
172
  with gr.Column():
173
  inp=gr.Textbox(label="Prompt")
174
  btn=gr.Button()
175
  with gr.Column():
176
+ col = gr.ColorPicker(label="Color Tint")
177
+ tint = gr.Slider(label="Tint Strength", minimum=0, maximum=1, step=0.01, value=0.30)
178
+
 
 
 
 
 
179
  with gr.Row():
180
  model_drop=gr.Dropdown(label="Models", choices=models, type='index', value=models[0])
181
  cnt = gr.Number(value=1)
182
  out_html=gr.HTML()
183
  outp=gr.Gallery()
184
  btn.click(run_dif_color,[inp,model_drop,cnt,col,tint],[outp,out_html])
185
+ app.launch()