pharmapsychotic commited on
Commit
a3cd3cd
1 Parent(s): bf8293f

Disable concurrency it's causing issues.

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -177,6 +177,9 @@ def analyze_tab():
177
  trending = gr.Label(label="Trending", num_top_classes=5)
178
  flavor = gr.Label(label="Flavor", num_top_classes=5)
179
 
 
 
 
180
  examples=[['example01.jpg', MODELS[0]], ['example02.jpg', MODELS[0]]]
181
  ex = gr.Examples(
182
  examples=examples,
@@ -188,8 +191,6 @@ def analyze_tab():
188
  )
189
  ex.dataset.headers = [""]
190
 
191
- button = gr.Button("Analyze", api_name="image-analysis")
192
- button.click(image_analysis, inputs=[image, model], outputs=[medium, artist, movement, trending, flavor])
193
 
194
  with gr.Blocks(css=CSS) as block:
195
  with gr.Column(elem_id="col-container"):
@@ -232,4 +233,4 @@ with gr.Blocks(css=CSS) as block:
232
  )
233
  share_button.click(None, [], [], _js=share_js)
234
 
235
- block.queue(max_size=64, concurrency_count=2).launch(show_api=False)
 
177
  trending = gr.Label(label="Trending", num_top_classes=5)
178
  flavor = gr.Label(label="Flavor", num_top_classes=5)
179
 
180
+ button = gr.Button("Analyze", api_name="image-analysis")
181
+ button.click(image_analysis, inputs=[image, model], outputs=[medium, artist, movement, trending, flavor])
182
+
183
  examples=[['example01.jpg', MODELS[0]], ['example02.jpg', MODELS[0]]]
184
  ex = gr.Examples(
185
  examples=examples,
 
191
  )
192
  ex.dataset.headers = [""]
193
 
 
 
194
 
195
  with gr.Blocks(css=CSS) as block:
196
  with gr.Column(elem_id="col-container"):
 
233
  )
234
  share_button.click(None, [], [], _js=share_js)
235
 
236
+ block.queue(max_size=64).launch(show_api=False)