* added docs to events
* added docs to events
* added style docs to highlightedtext
* add events to docs
* format
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: Ali Abid <aabid94@gmail.com>
`object-fit:contain` only works with `max-h` if they are set on the same element. I moved `max-h` to `img` and also increased the height a bit such that the plot has enough space and can adapt to the container height.
Fixes#1546
* mount custom css to the web component (#1536)
* set configurable min height prior to loading (#1532)
* set configurable minheight prio to loading
* formatting
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* release beta version for testing (#1541)
Co-authored-by: pngwn <hello@pngwn.io>
* image examples fix
* fix image test
* fix cache examples for audio and video
* fix tests
* fix audio test
* fix restore flagged file
* fix tests
* reformat
* tests fixes
* fix test
* reformat
* format
* fix test
* reformat
* fix image test
* renamed video demo
* removed redundant test that may have been causing rate limiting
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* changed default of share argument
* make share=False raise an Exception when localhost not reachable
* using self.share across the launch method
* reverted docstring to previous sentence
* added getter and setter for self.share
* added tests for setting Blocks.share
* fixed test
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Set max parallel threads to 100.
I could not find a better solution than monkey-patching
`anyio.to_thread.run_sync` to use a custom `CapacityLimiter`. I did try
to obtain the predictions inside a context handler instead:
```
async with self.limiter:
predictions = await run_in_threadpool(block_fn.fn, *processed_input)
```
However, that approach didn't seem to work.
* Make max parallel threads configurable.
`max_threads` can now be used in `launch` to specify the desired number
of parallel threads supported.
* Fix import order.
* Update gradio/blocks.py
* Replace `run_in_threadpool` with `run_sync`.
We create the capacity limiter on launch, and invoke
`anyio.to_thread.run_sync` directly instead of going through
`run_in_threadpool`. This allows for some code simplification: we no
longer need to patch `anyio.to_thread.run_sync`.
* max_parallel_threads
- resolve conflicts
* max_parallel_threads
- solve error
* max_parallel_threads
- solve async error
Co-authored-by: Pedro Cuenca <pedro@latenitesoft.com>