mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-13 11:57:29 +08:00
changes
This commit is contained in:
parent
e3aa311f8e
commit
20696acdf1
@ -83,9 +83,16 @@ img = gr.Image("lion.jpg").style(height='24', rounded=False)
|
||||
|
||||
Take a look at the [Docs](https://gradio.app/docs) to see all the styling options for each Component.
|
||||
|
||||
For additional styling ability, you can pass any CSS to your app using the `css=` kwarg:
|
||||
|
||||
```python
|
||||
with gr.Interface(css="body {background-color: red}") as demo:
|
||||
...
|
||||
```
|
||||
|
||||
## Queuing
|
||||
|
||||
If your app expects heavy traffic, set `enable_queue` parameter in the `launch` method to `True` to prevent timeouts. You should also do this if the inference time of your function is long (> 1min). This will queue up calls so only a single call is processed at a time.
|
||||
If your app expects heavy traffic, set `enable_queue` parameter in the `launch` method to `True` to prevent timeouts. This will queue up calls so only a single call is processed at a time, using long polling. Long polling also prevent network timeouts, so you should use queueing if the inference time of your function is long (> 1min).
|
||||
|
||||
With `Interface`:
|
||||
```python
|
||||
|
@ -78,3 +78,5 @@ gr.Series(generator, translator).launch() # this demo generates text, then tran
|
||||
```
|
||||
|
||||
And of course, you can also mix `Parallel` and `Series` together whenever that makes sense!
|
||||
|
||||
Docs: parallel, series
|
Loading…
Reference in New Issue
Block a user