fffiloni commited on
Commit
6ad0de3
1 Parent(s): 9250557

limit to upload only inputs, switch off apis

Browse files
Files changed (1) hide show
  1. app.py +17 -15
app.py CHANGED
@@ -64,7 +64,8 @@ with gr.Blocks(css=css) as demo:
64
  with gr.Row():
65
  with gr.Column():
66
  image = gr.Image(
67
- label="Input image",
 
68
  type="filepath",
69
  height=180
70
  )
@@ -184,20 +185,21 @@ with gr.Blocks(css=css) as demo:
184
  fn=predict,
185
  inputs=inputs,
186
  outputs=outputs,
187
- concurrency_limit=4
 
188
  )
189
 
190
- rotate_pitch.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
191
- rotate_yaw.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
192
- rotate_roll.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
193
- blink.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
194
- eyebrow.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
195
- wink.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
196
- pupil_x.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
197
- pupil_y.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
198
- aaa.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
199
- eee.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
200
- woo.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
201
- smile.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2)
202
 
203
- demo.queue().launch(share=False, show_error=True)
 
64
  with gr.Row():
65
  with gr.Column():
66
  image = gr.Image(
67
+ label="Input image",
68
+ sources=["upload"],
69
  type="filepath",
70
  height=180
71
  )
 
185
  fn=predict,
186
  inputs=inputs,
187
  outputs=outputs,
188
+ concurrency_limit=4,
189
+ api_open=False
190
  )
191
 
192
+ rotate_pitch.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
193
+ rotate_yaw.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
194
+ rotate_roll.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
195
+ blink.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
196
+ eyebrow.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
197
+ wink.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
198
+ pupil_x.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
199
+ pupil_y.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
200
+ aaa.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
201
+ eee.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
202
+ woo.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
203
+ smile.release(fn=predict, inputs=inputs, outputs=outputs, show_progress="minimal", concurrency_limit=2, api_open=False)
204
 
205
+ demo.queue().launch(share=False, show_error=True, show_api=False)