cswamy
77c900311e
Fixes issue 5781: Enables specifying a caching directory for Examples ( #6803 )
...
* issue 5781 first commit
* second commit
* unnecessary str removed
* backend formatted
* Update gradio/helpers.py
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Update guides/02_building-interfaces/03_more-on-examples.md
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* tests added
* add changeset
* format
---------
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-18 17:07:38 -08:00
Hannah
50496f967f
Adjust rounding logic when precision is None
in gr.Number()
( #6829 )
...
* adjust precision handling
add test
* add changeset
* formatting
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-18 23:42:19 +00:00
Abubakar Abid
1b9d4234d6
Prevent file traversals ( #6833 )
...
* prevent file traversal
* fix
* add changeset
* unit test
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-18 14:30:22 -08:00
Abubakar Abid
526fb6c446
Fix gr.load()
so that it works with the SSE v1 protocol ( #6810 )
...
* fix for gr.load()
* add changeset
* fix
* add test
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-15 12:35:46 -08:00
Abubakar Abid
c352811f76
Adds docstrings for gr.WaveformOptions
, gr.Brush
, and gr.Eraser
, fixes examples for ImageEditor
, and allows individual images to be used as the initial value
for ImageEditor
( #6799 )
...
* tweaks
* add changeset
* adding image editor
* changes
* add changeset
* docs
* add changeset
* add changeset
* refactor
* format
* example
* add changeset
* image editor
* add changeset
* commit
* added test
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-15 10:43:39 -08:00
Freddy Boulton
51e241addd
Fix flaky CI tests (again 😓 ) ( #6780 )
...
* network idle
* Use **/upload
* Test flakes
* Fix pythont tests
* add changeset
* Use right wait
* upload
* trigger ci
* swap order
* networkidle❓
* lint'
* df
* 2 workers
* networkidle
* Fix cli test
* pause
* 3.8 fix
* 3.8
* no promise.all
* trigger ci
* Add code
* mark xfail
* trigger ci
* timeout
* Empty
* Flake
* test
* Flakes
* change test
* awaits
* cleanup
* fixes
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-14 12:40:36 -08:00
Abubakar Abid
a807ede818
Fix backend tests on Windows ( #6781 )
...
* hotfix
* testing
* test
* fix
* fix
* add changeset
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-14 11:23:30 -08:00
Freddy Boulton
34f943101b
Python client properly handles hearbeat and log messages. Also handles responses longer than 65k ( #6693 )
...
* first commit
* newlines
* test
* Fix depends
* revert
* add changeset
* add changeset
* Lint
* queue full test
* Add code
* Update + fix
* add changeset
* Revert demo
* Typo in success
* Fix
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-13 17:47:06 -05:00
pngwn
1459119c6e
chore: update versions ( #6670 )
...
* chore: update versions
* change
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ali Abid <ubuntu@ip-172-31-25-241.us-west-2.compute.internal>
2023-12-12 18:32:54 -08:00
Freddy Boulton
c9673cacd6
Fix directory-only glob for FileExplorer ( #6689 )
...
* Fix glob
* add changeset
* Fix test
* lint
* sort
* Remove empty
* Select directory + test
* Workign fix
* WOrkign fix
* Directory click 😅
* add changeset
* Fix test
* Add dirs
* Select directory + test
* WOrkign fix
* Directory click 😅
* WIP
* add code
* Lint
* Use same color as file icon
* Fix test
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-12 16:39:11 -08:00
aliabid94
d76bcaaaf0
Fix api event drops ( #6556 )
...
* changes
* changes
* add changeset
* changes
* changes
* changes
* changs
* chagnes
* changes
* changes
* changes
* changes
* changes
* changes
* changes
* changes
* changes
* changes~git push
* changes
* changes
* changes
* changes
* changes
* changes
* changes
* changes
* changes
* changes
* changes
* changes
* change
* changes
* changes
* changes
* changes
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-25-241.us-west-2.compute.internal>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-12 15:24:46 -08:00
Yoann Poupart
28a7aa917f
Mount on a FastAPI app with lifespan manager ( #6759 )
...
* initial context manager fix
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-12 16:40:03 -05:00
Hannah
3240d042e9
Add editable
parameter to Audio ( #6745 )
...
* add editable param to audio and add story
* add changeset
* fix test
* fix test again
* tweak
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-11 18:42:21 +01:00
Yuichiro Tachibana (Tsuchiya)
9a5811df92
Fix the download button of the gr.Gallery()
component to work ( #6487 )
...
* Fix the download button of the `gr.Gallery()` component to work
* Refactoring js/gallery/shared/Gallery.svelte
* Fix `gr.Gallery()` to set `orig_name` for URLs
* Fix Gallery.postprocess()
* Fix `download()` to fallback to `window.open()` when CORS is not allowed
* Fix `gr.Gallery` to leave as None so it will be replaced with a local cache path and restore the `<a>` tag-based download feature on the frontend
* Align a variable name to its type name
* Fix Gallery's tests
* Fix the frontend test for gallery
* Revert "Fix `gr.Gallery` to leave as None so it will be replaced with a local cache path and restore the `<a>` tag-based download feature on the frontend"
This reverts commit d754980cc27ded760bfc26df4310f913c2c6944a.
* Revert "Fix Gallery's tests"
This reverts commit 4e2aa3fff1
.
* Revert "Fix the frontend test for gallery"
This reverts commit 007caa23e7
.
* Fix for linter
* Add a test about the download button
* Fix type defs on Gallery.postprocess
* Improve TestGallery
* add changeset
* Update gradio/components/gallery.py
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Update gradio/components/gallery.py
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Revert "Update gradio/components/gallery.py"
This reverts commit 4d6e127305
.
* Revert "Update gradio/components/gallery.py"
This reverts commit f2bfad0744
.
* Use `tuple` instead of `typing.Tuple`
* Revert "Use `tuple` instead of `typing.Tuple`"
This reverts commit 69ab93cad4
.
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-09 17:58:19 +01:00
Abubakar Abid
24e048196e
Hotfix: update huggingface_hub
dependency version ( #6704 )
...
* update requirements of hfhub
* add changeset
* requirements
* add changeset
* fixed
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-07 15:07:23 -08:00
Freddy Boulton
fe40308894
Rotate Images to Upright Position in preprocess ( #6676 )
...
* Code
* add changeset
* remove comment
* Add back try except
* Add code
* Use warning
* Use warning
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-07 13:16:48 -05:00
Abubakar Abid
cfd57005bc
Cause gr.ClearButton
to reset the value of gr.State
( #6680 )
...
* state
* note
* add changeset
* buttons
* clear button
* lint
* if
* clear'
* reset state
* fix test
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-06 17:35:19 -08:00
D V
8a70e83db9
switch from black to ruff formatter ( #6543 )
...
* migrate from black to ruff
* fix script and dependencies
* applying ruff
* add changeset
* add changeset
* address ruff feedback
* replace linter
* fixed typing
* fix typing
---------
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-06 15:16:32 -08:00
cswamy
7cbf96e0bd
Issue 5245: consolidate usage of requests and httpx ( #6598 )
...
* issue 5245 commit 1
* formatted
* add changeset
* fixes
* fixes
* make changes in client too
* remove requests from client
* add changeset
* add changeset
* Fixes to test_utils.py in client
* fixes in client utils.py and test_utils.py
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-05 14:18:09 -08:00
Abubakar Abid
299f5e238b
Update HF token used in CI tests ( #6671 )
...
* fix tests
* format
* fixes
* add changeset
* fixes
* fix
* fix
* update
* update
* test client
* format
* hf token 2
* add changeset
* add env
* add envs
* tests
* env
* fixes
* test external
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-05 12:49:48 -08:00
Freddy Boulton
d92c819419
Add concurrency_limit to ChatInterface, add IDE support for concurrency_limit ( #6653 )
...
* concurrency limit chat interface
* add changeset
* Update gradio/chat_interface.py
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-04 17:19:53 -05:00
v-chabaux
13ace035ed
Update file_explorer.py - Fixing error if nothing selected in file_count=single mode (return None rather) ( #6607 )
...
* Update file_explorer.py
Fixing error if nothing selected in file_count=single mode (return None rather)
* add changeset
* added unit tests
---------
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-30 08:33:10 +00:00
Abubakar Abid
d4e3a51890
Allows setting parameters of gr.ChatInterface
's Accordion
( #6518 )
...
* Chat Interface Accordion
* add changeset
* typing
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-21 10:58:53 -08:00
Yuichiro Tachibana (Tsuchiya)
1baed201b1
Fix SourceFileReloader to watch the module with a qualified name to avoid importing a module with the same name from a different path ( #6497 )
...
* Fix SourceFileReloader to watch the module with a qualified name to avoid importing a module with the same name from a different path
* Fix the unit tests
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-20 13:54:26 -05:00
Abubakar Abid
a1e3c61f41
Allow setting a default_concurrency_limit
other than 1 ( #6439 )
...
* changes
* format
* add changeset
* add changeset
* fix
* format
* fix
* add test
* change
* update test
* moved to queue()
* typo
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-16 12:42:49 -08:00
Freddy Boulton
58e3ca8260
Custom Component CLI Improvements ( #6436 )
...
* Finishing touches
* Disable metadata prompt in tests
* add changeset
* lint website
* Fix link:
* Fix redirects
* failsafe
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-16 13:23:50 -05:00
112292454
ac4ca59c92
Extract video filenames correctly from URLs ( #6428 )
...
* 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>
2023-11-15 22:36:39 -08:00
aliabid94
324867f63c
Fix event target ( #6383 )
...
* changes
* changes
* add changeset
* chagnes
* chaneg
* changes
* fix
* changes
* changes
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-13 15:14:55 -08:00
Yuichiro Tachibana (Tsuchiya)
8ef48f8524
Async functions and async generator functions with the every
option to work ( #6395 )
...
* Extend `get_continuous_fn()` to deal with async functions and async generator functions
* add changeset
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-13 16:12:49 -05:00
Yuichiro Tachibana (Tsuchiya)
d84209703b
Lite: SharedWorker mode ( #6099 )
...
* 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>
2023-11-13 17:32:00 +09:00
Freddy Boulton
2090aad731
Move wavesurfer dep to js/audio ( #6382 )
...
* Move wavesurfer dep to js/audio
* Add code
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-12 12:18:11 -05:00
Abubakar Abid
de998b2812
Processes avatar_images
for gr.Chatbot
and icon
for gr.Button
correctly, so that respective files are moved to cache ( #6379 )
...
* format
* add changeset
* add changeset
* add changeset
* whoops fix
* notebook
* tests
* refactor
* refactor
* format
* added test
* fix test
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-11 23:13:27 -08:00
Abubakar Abid
d31d8c6ad8
Allows sources
to be a string for gr.Image
( #6378 )
...
* fixes
* components
* add changeset
* sources
* video
* add changeset
* fixes
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-11 15:18:02 -08:00
Freddy Boulton
8a3f45c261
Fix component update bug ( #6368 )
...
* Add code
* Add comment
* add changeset
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-10 12:26:07 -08:00
Abubakar Abid
506ab9e4b4
Fix backend tests on CI ( #6330 )
...
* test flaky
* reduce num tests
* fail intenationally
* add back
* revert test changes
* remove coverage
* diff
* fix tests
* format
2023-11-08 19:36:10 -08:00
Freddy Boulton
ed546f2e13
Fix Model3D template ( #6326 )
...
* Add test
* add changeset
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-07 15:06:09 -08:00
Hannah
570866a3bd
Hide show API link when in gradio lite ( #6320 )
...
* hide show_api button if IS_WASM ist true
* add test
* add changeset
* add changeset
* formatting
* revert ruff change
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-07 17:49:34 +01:00
Hannah
5551d8e439
Fix sources
list order in test_components.py
( #6321 )
...
* fix sources list ordering
* revert ruff change
2023-11-07 17:22:42 +01:00
Abubakar Abid
c561287812
Fix updating choices in gr.Dropdown
and updates related to other components ( #6309 )
...
* postprocess fix
* add changeset
* add changeset
* blocks
* formatting
* demo
* add changeset
* Add code
* reduce
* trigger ci
* Update gradio/blocks.py
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-11-07 04:16:29 -08:00
Abubakar Abid
dfdaf10926
Fix data model for gr.DataFrame
( #6310 )
...
* datamodel for df
* add changeset
* fix
* Add code
* reduce
* trigger ci
* typing
* union
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-11-06 19:04:23 -08:00
Abubakar Abid
176c4d1400
Temporary fix to be able to load themes from Hub ( #6311 )
...
* Add code
* push temporary fix for tags
* temp fix
* add changeset
* reduce
* trigger ci
---------
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-06 15:40:08 -08:00
Srijan Sahay Srivastava
7ab73df48e
fix regarding callable function error ( #6294 )
...
* fix regarding callable function error
* add changeset
* fix
* push
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-11-06 12:12:28 -08:00
Freddy Boulton
92278729ee
Gallery preview fix and optionally skip download of urls in postprcess ( #6288 )
...
* Add code
* add changeset
* Use urls from our s3 bucket
* Add notebook code
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-03 18:39:25 -04:00
Freddy Boulton
ac4f2bcded
Remove **kwargs from queue ( #6232 )
...
* Rework queue method params
* add changeset
* raise instead
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-03 11:40:24 -04:00
Abubakar Abid
12d8e90a16
Fixes input Image
component with streaming=True
( #6272 )
...
* fix streaming
* cleanpu
* add changeset
* fix
* docstrings and tests
* notebooks
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-02 17:38:13 -07:00
Abubakar Abid
e32bac8944
Fix updating interactive prop ( #6266 )
...
* interactive
* added functional test
* notebook
* format
* add changeset
* fix
* simplify backend
* simplify backend
* simplify backend
* fix tests
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-02 16:35:27 -07:00
Egon Ferri
a6bb7222ab
fix: avoid unnecessary folders creation when flagging ( #6245 )
...
* fix: avoid unnecessary folders creation when flagging
* test: flagging_does_not_create_unnecessary_directories
---------
Co-authored-by: Egon Ferri <egon.ferri@immobiliare.it>
2023-11-02 12:28:38 -07:00
Dylan Ebert
dd901c1b0a
Model3D panning, improved UX ( #6240 )
...
* Model3D panning, improved UX
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-01 16:00:55 -07:00
Freddy Boulton
3e31c1752e
Add likeable to config for Chatbot ( #6231 )
...
* Add likeable to config
* add changeset
* Add test
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-01 16:32:13 -04:00
pngwn
874005938d
fix ci ( #6235 )
...
* fix ci
* format
* add changeset
* ignore generated files
* delete changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-01 19:37:36 +00:00