* Update video.py
cannot process url like "https:/example.com/avatar/xxxx.mp4?se=2023-11-16T06:51:23Z&sp=r" correctly, will get format like"mp4?se=2023-11-16T06:51:23Z&sp=r", and do unnecessary convert
* add changeset
* add changeset
* separate util function
* separated into util function
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Create the SharedWorker mode
* Fix the app_id management mechanism to be context-based so it works properly with run_file() and run_code()
* Adjust updateProgress() for the SharedWorker mode
* Make `get_continuous_fn()` Wasm-compatible in order for the created function not to occupy the thread with a loop with `time.sleep()` which is no-op in the Wasm env
* add changeset
* Add the `shared-worker` option to the custom-element API
* Apply formatter to js/app/src/lite/index.ts
* format
* Revert pnpm-lock.yml file version which is not needed to be changed in this PR
* Fix the unittest for `get_continuous_fn()`
* Fix the unit test because `anext()` is not available in Python 3.8, which is used in the CI env
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* [WIP] Replace the HTTP call to /api/predict with a function call
* Extract shared logics into route_utils.*
* Fix Queue.call_prediction() to return the output dict and raise exceptions
* Remove run_predict()
* Create route_utils.call_process_api()
* Check Blocks.api_open and return 404 if it's false
* Refactoring on queueing.py
* Refactoring on queueing.py, renaming data to body
* Fix the if block of availability check in the predict() endpoint handler
* Put the code of clearning pending streams into route_utils.call_process_api
* Format gradio/routes.py
* Fix queueing.Queue.reset_iterators() not to call an HTTP endpoint
* Remove ququeing.Queue.queue_client, which is no longer used
* Fix with static type analysis
* Remove gradio.utils.AsyncRequest, which is no longer used
* add changeset
* Remove PEP604-syntax which is not supported by Python<3.10
* Fix gradio/queueing.py
* Remove AsyncRequest test cases
* Fix queueing and routes test cases
* Fix
* Replace Queue.server_url with .server_app and remove methods related to the old .server_url
* Revert `gradio_api_url` because building the document fails
* Add __future__.annotations to route_utils.py
* Update gradio/queueing.py
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Format
* Mark the `gradio_api_url` parameter of `mount_gradio_app()` deprecated
* Fix Queue.call_prediction to convert the output to a plain object
* Add a `except asyncio.CancelledError` handler to avoid printing stack trace for task cancellation
* Move the call of `route_utils.restore_session_state` into `route_utils.call_process_api`
* exception class
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Move analytics-related bits to gradio.analytics
* Do not do any analytics requests if analytics are disabled
* Remove unused log_feature_analytics
* removed redundant analytics, rewrote
* renamed
* save
* fixed test'
---------
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Fix HTTP code for file request (static, assets, file)
* Fix bugs related to utils.abspath for symlink and unresolvale path
* Requesting a directory from the file route now returns 403
* replace pytests with unittests
* formatting
* test blocks
* fixed test/blocks
* test components
* working on test components
* test components
* test components almost fixed
* removed unittest
* linting
* fix remaining tests
* lint
* formatting
* changelog
* changes
* Delete media_data.py.isorted
* fixes in other files
* fixes in other files
* added for grid
* removed status tracker
* removed status tracker
* added deprecation warning
* formatting
* queue-refactor-backend (#1489)
* queue-refactor-backend
- create a template for the new design
* queue-refactor-backend
- clean after the old queue
* queue-refactor-backend
- add basic test to websocket endpoint
* queue-refactor-backend
- small fix
* queue-refactor-backend
- debugs&fixes&finalizations
- test the flow with postman
* queue-refactor-backend
- tweaks on websocket closing
* queue-refactor-backend
- cleanup
* queue-refactor-backend
- cleanup & tweaks
* queue-refactor-backend
- cleanup & tweaks
* queue-refactor-backend
- cleanup & tweaks
- correct the exception handling
* queue-refactor-backend
- add websockets dependency
* queue-refactor-backend
- reformat
* queue-refactor-backend
- add single event test
* queue-refactor-backend
- tweaks
- remove outdated tests
* queue-refactor-backend
- reformat
* queue-refactor-backend
- reformat
* queue-refactor-backend
- reformat
* queue-refactor-backend
- add Queue configurations to Blocks.launch()
- add live_queue_update to send estimations whenever a job gets fetched from the Queue
* queue-refactor-backend
- add Queue configurations to Blocks.launch()
- add live_queue_update to send estimations whenever a job gets fetched from the Queue
* queue-refactor-backend
- tweaks
* queue-refactor-backend
- make SLEEP_WHEN_FREE shorter
Co-authored-by: Ali Abid <aabid94@gmail.com>
* Add estimation parameters to queue (#1889)
* - tweaks on Estimation
* version
* Revert "version"
This reverts commit bd1f4d7bfe.
* some fix and tweaks
* implement queue frontend (#1950)
* implement queue frontend
* fix types
* fix ws endpoint in build mode
* cleanup
* Queue tweaks (#1909)
* tweaks on estimation payload
* Queue keep ws connections open (#1910)
* 1. keep ws connections open after the event process is completed
2. do not send estimations periodically if live queue updates is open
* fix calculation
* 1. tweaks on event_queue
* fix issue - create new ws for each request
* format
* fix
* fix tests
* fix tests
* tets
* test
* changes
* changes
* changes
* change'
* wtf
* changes
* changes
* file perms
* Release queue beta v1 (#1971)
* - release the new queue
* - bypass the issue in the tests
- rewrite the lost part in the codebase
* - add concurrent queue example (#1978)
* rank_eta calc
* Queue fixes (#1981)
* change
* format
* - comment out queue tests as they dont work well
* - reformat
* Update gradio/event_queue.py
Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>
* changes
* changes
* change
* weird fix
Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>
* release-queue-v3 (#1988)
* Fix frontend queuing to target secure WSS (#1996)
* change
* format
* changes
* queue-concurrency-tweaks (#2002)
1. make gather_data and broadcast_estimation sequential instead of concurrent because they were deleting elements at the same time and raising expections which was lowering the performance
* Update Queue API, documentation (#2026)
* changes
* changes
* fixes
* changes
* change
* fix
Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
* Add python-3.7 tests
* Format components
* Use latest images
* Use python instead of python3
* Force reset cache
* Reset cache
* Use Ipython 7 for python 3.7 support
* Install chrome
* Add two text files
* Reset cache
* Use Literal from typing extensions
* Update cache key
* Linting
* Fix requests tests
* Exit if running from wrong python version
* Use one requirements file
* Fix comment
* Fix comment
* Use python 3.7.13
* empty commit
* Delete chrome driver to see if it works
* Test no chrome with new cache
* Remove chrome driver install entirely