Commit Graph

271 Commits

Author SHA1 Message Date
pngwn
1265a9ac13
chore: update versions (#5817)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-05 19:55:12 -07:00
Abubakar Abid
796145e2c4
Fix calls to the component server so that gr.FileExplorer works on Spaces (#5816)
* changes

* add changeset

* changes

* demo

* file explorer

* lint

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 19:38:59 -07:00
pngwn
3d263ba007
chore: update versions (#5796)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-05 14:10:45 -07:00
Abubakar Abid
a0d3cc45c6
Fix gr.SelectData so that the target attribute is correctly attached, and the filedata is included in the data attribute with gr.Gallery (#5798)
* fix select

* add changeset

* add changeset

* restore

* refactor

* add pytest

* typo

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 12:53:52 -07:00
Srijan Sahay Srivastava
37e70842d5
added try except block in state.py (#5790)
* added try except block in `state.py`

added try except block in `state.py` which will raise a "ValueError"

* add changeset

* updated `state.py` and added test for deepcopy

updated `state.py` and added test for deepcopy named test_initial_value_deepcopy in `test/test_components.py`

* lint

* test fix

* explain test

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 12:33:15 -07:00
Abubakar Abid
4567788bd1
Adds the ability to set the selected_index in a gr.Gallery (#5783)
* selected_index

* Gallery

* changes

* modify

* add changeset

* fix select issue

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 11:35:42 -07:00
Abubakar Abid
957ba5cfde
Prevent bokeh from injecting bokeh js multiple times (#5795)
* remove dep line in demo

* linting

* linting

* fix

* merge

* add changeset

* lint

* notebook:

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 11:17:49 -07:00
Freddy Boulton
c0fef44541
Revert replica proxy logic and instead implement using the root variable (#5776)
* Revert "Fix for deepcopy errors when running the replica-related logic on Spaces (#5722)"

This reverts commit dba651904c.

* Revert "Fully resolve generated filepaths when running on Hugging Face Spaces with multiple replicas (#5668)"

This reverts commit d626c21e91.

* add changeset

* Trigger local

* add changeset

* add to root

* add changeset

* strip url

* resolve root

* changes

* fix

* format

* logs

* format

* add changeset

* reverse order

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-05 11:17:16 -07:00
aliabid94
e4a307ed6c
Add component <-> server direct communication support, as well as a "file explorer" component (#5672)
* changes

* changes

* add changeset

* add changeset

* Server fns ext (#5760)

* start changes

* changes

* changes

* fix arrows

* add changeset

* rename demo

* fix some ci

* add changeset

* add changeset

* fix

* remove configs

* fix

* fix

* add changeset

* fixes

* linting

* Update gradio/components/file_explorer.py

* notebook

* typing

* tweaks

* fixed class method problem

* fix test

* file explorer

* gr.load

* format

* tweaks

* fix

* fix

* fix

* fix

* final tweaks + changelog

* changelog

* changelog

* changelog

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-05 14:20:01 +01:00
gibiee
caeee8bf78
ensure the client does not depend on window when running in a node environment (#5787)
* modify url_params

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 14:14:10 +01:00
Hannah
f096c3ae16
Throw helpful error when media devices are not found (#5794)
* add test

* add changeset

* tweak copy

* error logic

* add changeset

* copy tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-04 20:31:00 +01:00
Abubakar Abid
ed0f9a21b0
Adds change() event to gr.Gallery (#5780)
* add change event to gallery

* revert

* format

* add changeset

* lint

* add tests

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-04 12:25:03 -07:00
pngwn
5d5ddcfa9b
chore: update versions (#5786)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-04 15:46:45 +01:00
Hannah
1ea6080247
change minor to patch (#5793) 2023-10-04 15:37:57 +01:00
Hannah
e2874bc3cb
fix pending chatbot message styling and ensure messages with value None don't render (#5775)
* fix pending chatbot message styling

* border fixes

* add changeset

* add changeset

* ensure null messages arent shown

* add hide css again

* render loading inside message + add test

* fix test

* add changeset

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-04 14:50:19 +01:00
Yuichiro Tachibana (Tsuchiya)
6e56a0d9b0
Lite: Websocket queueing (#5124)
* Create a Wasm-emulated WebSocket connection and fix @gradio/client to inject it

* Explicitly set the default response class for the Wasm mode

* add changeset

* Fix is_self_origin() to compare only hosts and rename it to is_self_host()

* Fix Blocks.close() to cancel async tasks in the case of Wasm and call it from wasm_utils.register_app() to dispose an old app instance

* Update comment

* Hold the asyncio.Task objects and cancel them at `Blocks.close()`

* Add try-except to handle the case where `events` is not set to `queue.active_jobs` when `queue.process_events` is called

* Format queueing.py

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-04 18:19:09 +09:00
pngwn
d6295df030
chore: update versions (#5742)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-02 20:55:55 -07:00
Dawood Khan
e842a561af
Fix new line issue in chatbot (#5755)
* fix new line

* add changeset

* line breaks param

* add changeset

* fix test

* Update gradio/components/chatbot.py

* Update gradio/components/dataframe.py

* Update gradio/components/markdown.py

* add changeset

* fix static markdown

* lint

* line breaks

* fixes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-02 20:44:58 -07:00
Abubakar Abid
502054848f
Fix Gallery columns and rows params (#5754)
* fix gallery params

* add changeset

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 20:11:09 -07:00
Abubakar Abid
ef96d35122
Don't raise warnings when returning an updated component in a dictionary (#5766)
* testing

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 19:48:32 -07:00
Abubakar Abid
2a5b9e03b1
Added support for pandas Styler object to gr.DataFrame (initially just sets the display_value) (#5569)
* adding precision to df

* add changeset

* docstring

* precision

* add changeset

* fix

* fixes

* add changeset

* add visual test

* lint

* fixes

* lint

* format

* add changeset

* ts changes

* analytics

* dataframe typing

* typing

* demo

* fix

* lint

* interactive dataframe

* dataframe

* fix typing

* add test

* upgrade pandas version

* fix pandas version

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 14:02:03 -07:00
Abubakar Abid
caf6d9c0e1
Set share=True for all Gradio apps in Colab by default (#5767)
* Set share=True for all Gradio apps in Colab by default

* add changeset

* fix tests

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 12:51:56 -07:00
Hannah
8f0fed857d
Improve chatbot accessibility and UX (#5699)
* add a11y changes and css tweaks

* add a11y changes and css tweaks

* change like/dislike/copy buttons ux

* cleanup

* add laout param

* tweak

* add changeset

* fill icon on click

* text alignment tweak

* format + test

* fix browser test

* avatar tweaks

* add stories

* tweak

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 19:29:20 +02:00
Hannah
abb5e9df47
Ensure images with no caption download in gallery (#5735)
* ensure images with no caption download in gallery

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-29 16:34:28 +02:00
Florian Bruggisser
c9af4f7940
Added timeout and error handling for frpc tunnel (#5731)
* added timeout and error handling for frpc tunnel

* add changeset

* lint

* typing

* spell

* tunneling

* lint

* strip

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-28 13:47:14 -07:00
pngwn
898668596d
chore: update versions (#5712)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-28 12:06:09 -07:00
Yuichiro Tachibana (Tsuchiya)
3a48490bc5
Add a bare Component type to the acceptable type list of gr.load()'s inputs and outputs (#5732)
* Add a bare `Component` type to the acceptable type list of `gr.load()`'s `inputs` and `outputs`

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-09-28 11:39:56 -07:00
pngwn
78e7cf5163
ensure internal data has updated before dispatching success or then events (#5705)
* ensure internal data has updated before dispatching then or success events

* ensure internal data has updated before dispatching then or success events

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-28 11:19:59 -07:00
Abubakar Abid
dba651904c
Fix for deepcopy errors when running the replica-related logic on Spaces (#5722)
* fix changelogs

* pass

* add changeset

* test

* config

* change

* fixes

* route utils

* add changeset

* add changeset

* add lock

* print

* route url

* replicas

* replicas

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-28 10:59:31 -07:00
ylhsieh
96c4b97c74
Adjust translation (#5726)
* Adjust translation

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2023-09-28 15:47:11 +02:00
Ali Abdalla
84e03fe506
Adds copy buttons to website, and better descriptions to API Docs (#5721)
* add missing docstring to highlightedtext

* add description to return types in api_docs

* add copy buttons to docs

* fix up descriptions for filepaths

* add copy buttons to every codeblock

* add changeset

* fix backend tests

* add changeset

* better worded descriptions

* fix color_map description

* fix formatting in code snippets

* add space

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-27 23:23:01 -07:00
Abubakar Abid
e3e47991ac
fix changelogs (#5718) 2023-09-27 15:55:23 -07:00
Abubakar Abid
a0fc5a2967
Make Tab and Tabs updatable (#5714)
* fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-27 14:42:55 -07:00
Dawood Khan
c10dabd6b1
Fixes gr.select() Method Issues with Dataframe Cells (#5713)
* fixes

* add changeset

* pr fixes

* fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-27 13:24:55 -07:00
Abubakar Abid
d626c21e91
Fully resolve generated filepaths when running on Hugging Face Spaces with multiple replicas (#5668)
* print

* add changeset

* url

* routes

* routes

* test

* test

* add to / route

* comment

* root_url approach

* replica url

* print

* print

* test

* revert

* fixes

* changes

* replica url fix

* lint

* routes

* routes

* fix

* docstring

* add changeset

* add changeset

* add changeset

* modify in place

* add test

* unit tests

* fix copy

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-27 12:58:31 -07:00
Charles Bensimon
c2b31c396f
Context-based Progress tracker (#5693)
* Context-based Progress tracker

* Lint

* add changeset

* Context-based virtual unpatch

* Avoid creating TrackedIterable if not patched

* Fix function_wrapper args

* More correct

* Add some types

* Single Progress instance to allow nested tqdms

* progress_tracker -> progress

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-27 11:37:26 -07:00
Charles Bensimon
aefb556ac6
fix: prevent internal log_message error from /api/predict (#5711)
* Prevent erroring on log_message from /api/predict

* add changeset

* add changeset

* add changeset

* updated docstrings

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-27 11:20:28 -07:00
pngwn
09ac63e818
chore: update versions (#5702)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-26 22:54:51 -07:00
Abubakar Abid
ee8eec1e5e
Fix for regression in rendering empty Markdown (#5701)
* quick fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-26 22:40:35 -07:00
pngwn
543f327723
chore: update versions (#5596)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-26 14:50:39 -07:00
Dawood Khan
f4e4f82b58
Increase Slider clickable area (#5697)
* slider click area

* add changeset

* fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-26 15:46:06 -04:00
Abubakar Abid
6b8c8afd98
Fix incorrect behavior of gr.load() with gr.Examples (#5690)
* testing

* fixes

* chat fix

* lint

* add changeset

* fix

* simplify

* simplify

* spacing

* remove print

* docstring

* dataset

* lint

* add changeset

* fix test

* add test

* added test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-26 12:20:34 -07:00
Abubakar Abid
e51fcd5d54
setting share=True on Spaces or in wasm should warn instead of raising error (#5696)
* setting share=True on Spaces or in wasm should raise warning instead of error

* tweak

* add changeset

* lint

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-26 12:13:15 -07:00
Ali Abdalla
b619e6f6e4
Reorganize Docs Navbar and Fill in Gaps (#5675)
* remove combining-interfaces

* reorg navbar and other changes

* better docs for error, warning, and info

* group them together

* navbar reactively update

* add changeset

* lint

* fix chatinterface test

* fix test again

* revert changes to chatinterface test

* Update gradio/helpers.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Update gradio/helpers.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: Hannah <hannahblair@hotmail.co.uk>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-26 02:16:08 -07:00
D V
40de3d2178
add query parameters to the gr.Request object through the query_params attribute (#5681)
* add queryParams to frontend request to backend

* add changeset

* update guide

* added docs

* add changeset

* fix tests

* client

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-25 22:25:09 -07:00
aliabid94
e1874aff81
Add gr.on listener method (#5639)
* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-25 15:25:16 -07:00
renovate[bot]
6a36c3b786
chore(deps): update dependency @types/prismjs to v1.26.1 (#5671)
* chore(deps): update dependency @types/prismjs to v1.26.1

* add changeset

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-25 15:04:20 -07:00
Abubakar Abid
2e25d43058
Pause autoscrolling if a user scrolls up in a gr.Textbox and resume autoscrolling if they go all the way down (#5652)
* only autoscroll if user hasn't scrolled up

* docstring

* fixes

* add changeset

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-25 15:03:10 -07:00
Yuichiro Tachibana (Tsuchiya)
9f9af327c9
[Refactoring] Convert async functions that don't contain await statements to normal functions (#5677)
* [Refactoring] Convert async functions that don't contain `await` statements to normal functions

* add changeset

* add changeset

* fix tests

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-25 13:58:01 -07:00
Ali Abdalla
c5e9695596
Fix small issues in docs and guides (#5669)
* Keep website guides sidebar width consistent

* add next / prev buttons to chatinterface

* add changeset

* sidebar fixes on docs

* clean iframes from guides

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-25 13:42:32 -07:00