Commit Graph

5634 Commits

Author SHA1 Message Date
pngwn
ef4ca645a1
chore: update versions (#5476)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-12 19:31:08 -07:00
Ali Abdalla
df623e743a
Toggle main vs versioned demos on website and show install snippet (#5481)
* Chagnes

* demos updating correctly

* wheel

* rework

* add changeset

* add warning about share=true

* Add to other pages

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-12 19:03:11 -07:00
Hannah
d112e2611b
Allow interactive input in gr.HighlightedText (#5400)
* add preprocess param to highlighted_text.py

* add params

* static tweaks

* add interactive highlight container

* highlight selection logic

* allow editing label value and move shared funcs

* add changeset

* remove py code

* wait for input render

* remove redundant event listeners

* accessibility enhancements and remove label logic

* add keyboard navigation and interaction

* merge adjacent empty elements and split input element

* add interactive support for scores mode

* remove merge adjacent logic and move to frontend

* tweak

* add changeset

* format backend

* tweaks

* backend test tweaks

* set the interactive default to None

* BE tweak

* unit tests and stories

* be formatting

* fix label errors

* tweak

* fix tests

* fix tests

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-12 18:47:16 -07:00
Abubakar Abid
05715f5599
Adds a filterable parameter to gr.Dropdown that controls whether user can type to filter choices (#5508)
* dropdown

* changes

* add changeset

* refactor

* cleanup

* dropdown

* more refactoring

* fixes

* simplify, docstring

* restore active_index

* split into two files

* new files

* simplify

* single select dropdown working

* single select dropdown almost working

* dropdown

* multiselect

* multiselect wip

* multiselect

* multiselect

* multiselect

* interactive working

* dropdown

* lint

* add changeset

* type

* typing

* fix multiselect static

* dropdown

* stories and tests

* split stories

* lint

* add changeset

* revert

* add changeset

* fix x

* dropdown

* lint, test

* backend fixes

* lint

* fix tests

* lint

* fix final test

* clean

* review fixes

* dropdown

* lint

* lint

* changes

* typing

* fixes

* active index null bug

* adding filterable parameter to dropdown

* dropdown

* lint

* add changeset

* add changeset

* svelte

* fix test

* add changeset

* added warning

* lint

* fix tests

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-12 18:36:29 -07:00
Dawood Khan
8909e42a7c
Adds autoscroll param to gr.Textbox() (#5488)
* autoscroll param

* add changeset

* fix

* test fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-12 18:25:03 -04:00
Abubakar Abid
afcf3c48e8
Do not expose existence of files outside of working directory (#5510)
* reorder for security

* add changeset

* routes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-12 12:29:09 -07:00
Abubakar Abid
82ec4d2622
Allow interface with components to be run inside blocks (#5496)
* allow interface to run inside blocks

* fix test

* change

* add changeset

* format

* fixes

* fixes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-12 12:25:46 -07:00
Razhan Hameed
c60b89b0a5
Adding Central Kurdish (#5475)
* adding Central Kurdish

* 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-12 18:14:34 +01:00
Abubakar Abid
ddc02268f7
Allows the gr.Dropdown to have separate names and values, as well as enables allow_custom_value for multiselect dropdown (#5384)
* dropdown

* changes

* add changeset

* refactor

* cleanup

* dropdown

* more refactoring

* fixes

* simplify, docstring

* restore active_index

* split into two files

* new files

* simplify

* single select dropdown working

* single select dropdown almost working

* dropdown

* multiselect

* multiselect wip

* multiselect

* multiselect

* multiselect

* interactive working

* dropdown

* lint

* add changeset

* type

* typing

* fix multiselect static

* dropdown

* stories and tests

* split stories

* lint

* add changeset

* revert

* add changeset

* fix x

* dropdown

* lint, test

* backend fixes

* lint

* fix tests

* lint

* fix final test

* clean

* review fixes

* dropdown

* lint

* lint

* changes

* typing

* fixes

* active index null bug

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-12 09:58:18 -07:00
Hannah
9ee20f499f
Validate i18n file names with ISO-639x (#5505)
* validate i18n files

* add changeset

* lockfile

* test

* remove log

* Rename zh-tw.json to zh-TW.json

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-12 17:39:15 +01:00
pngwn
9234167c85
fix (#5503) 2023-09-12 14:31:54 +01:00
pngwn
b1683bd5fb
update changeset workflow for v4 (#5499)
* update changeset workflow for v4

* update changeset workflow for v4
2023-09-12 13:27:50 +01:00
Dawood Khan
a4e010a96f
Fix share button position (#5470)
* fix share button position

* add changeset

* top padding

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-11 16:55:25 -04:00
Yuichiro Tachibana (Tsuchiya)
b271e73886
Remove except asyncio.CancelledError which is no longer necessary due to 53d7025 (#5473)
* Remove `except asyncio.CancelledError` which is no longer necessary due to 53d7025

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-11 14:39:52 -04:00
Yuichiro Tachibana (Tsuchiya)
041560f9f1
Fix queueing.call_prediction to retrieve the default response class in the same manner as FastAPI's implementation (#5474)
* Fix `queueing.call_prediction` to retrieve the default response class in the same manner as FastAPI's implementation

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-11 14:22:06 -04:00
Lucain
23776b5eb2
No need to install deps anymore (#5477) 2023-09-11 11:59:04 -04:00
Hannah
bd2fda77fc
Dispatch stop_recording event in Audio (#5459)
* add stop recording event dispatch

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-11 10:45:06 +01:00
pngwn
3e1e8fc5d2
chore: update versions (#5457)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-08 12:36:03 +01:00
pngwn
6e381c4f14
ensure dataframe doesn't steal focus (#5456)
* ensure dataframe doesn't steal focus

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-08 12:28:11 +01:00
pngwn
acabe4ed42
chore: update versions (#5446) 2023-09-07 23:31:34 +01:00
pngwn
7a4a89e5ca
ensure iframe is correct size on spaces (#5447) 2023-09-07 23:18:34 +01:00
pngwn
67bb7bcb6a
ensure dataframe doesn't scroll unless needed (#5445)
* ensure dataframe doesn't scroll unless needed

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-07 17:26:58 -04:00
pngwn
710cbb67fc
chore: update versions (#5419)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-07 13:26:14 -07:00
Chaitanya Giri
aad7acd712
Add sort to bar plot (#5427)
* Add sort to bar plot

* remove reverse parameter from barplot class

* add changeset

* Rename sort_by to sort in BarPlot class

* Add test

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-07 15:54:32 -04:00
pngwn
a96d4c57ca
revert to actions/checkout v3 (#5442) 2023-09-07 12:28:52 -07:00
pngwn
afac000633
significantly improve the performance of gr.Dataframe for large datasets (#5342)
* virtualise the dataframe

* add changeset

* fix non visible df

* add changeset

* tweak width calculation

* check client

* add changeset

* fix weird heights

* add changeset

* remove logs

* add changeset

* fix height measurement

* fix tests

* fix rendering for short dataframes

* cleanup

* add changeset

* fix scroll and loading

* fix scollbars and loading border

* fix scollbars and loading border

* add changeset

* fix many bugs

* fixes

* maybe this

* tweaks

* fix everything

* notebooks

* remove comments

* fix things

* fix visibility issue

* tweak

* fix demos

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-07 19:36:42 +01:00
Freddy Boulton
7ab4b70f68
api_open does not take precedence over show_api (#5436)
* Fix bug

* Fix

* add changeset

* Add code

* Fix docstring

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-07 13:22:55 -04:00
Dawood Khan
d14d63e30c
Auto scroll to bottom of textbox (#5417)
* scroll

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-07 11:53:03 -04:00
Freddy Boulton
26fef8c7f8
Skip view_api request in js client when auth enabled (#5412)
* Add code

* add changeset

* Remove console

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-06 15:19:41 -04:00
Ali Abdalla
bb31cd7dd0
Remove stable diffusion demo from landing page (#5423)
* remove stable diffusion demo

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-05 18:08:45 -07:00
Yuichiro Tachibana (Tsuchiya)
c77f05abb6
Fix the Queue to call API endpoints without internal HTTP routing (#5165)
* [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>
2023-09-05 15:33:15 -07:00
Freddy Boulton
83cde9b9e3
Fix dataset demo (#5390)
* Fix as_example for ChecboxGroup

* add changeset

* add changeset

* Add code

* delete changeset

* Add ntoebook

* Exception

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-05 11:47:10 -04:00
renovate[bot]
f18e317419
chore(deps): update dependency chromatic to v7 (#5408)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-05 08:20:47 -07:00
renovate[bot]
fdbe58b481
chore(deps): update actions/checkout action to v4 (#5409)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-05 08:18:42 -07:00
pngwn
d5d0e418c9
chore: update versions (#5361)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-01 17:27:32 -07:00
aliabid94
55fed04f55
Introduce decorator syntax for event listeners (#5395)
* changes

* add changeset

* changes

* changes

* Update fuzzy-numbers-repair.md

* Update fuzzy-numbers-repair.md

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-09-01 16:27:16 -07:00
Dawood Khan
abf1c57d7d
Like/Dislike Button for Chatbot (#5391) 2023-09-01 19:20:55 -04:00
ylhsieh
ca2aa8b25b
Update guide for API (#5397) 2023-09-01 09:46:55 -07:00
Abubakar Abid
e4e7a43199
Renders LaTeX that is added to the page in gr.Markdown, gr.Chatbot, and gr.DataFrame (#5393)
* fix

* add changeset

* add changeset

* cleanup

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-31 17:28:01 -07:00
Abubakar Abid
4d94ea0a0c
Adds horizontal scrolling to content that overflows in gr.Markdown (#5394)
* markdown'

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-31 16:39:49 -07:00
Abubakar Abid
79d8f9d891
Adds height and zoom_speed parameters to Model3D component, as well as a button to reset the camera position (#5373)
* add params in backend

* tweaks

* add changeset

* updates

* tweaks

* lint

* cleanup

* fix tests

* add reset button

* add changeset

* lint

* add changeset

* add changeset

* lint

* add changeset

* faster

* add changeset

* undo website

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-31 12:24:22 -07:00
renovate[bot]
3d66e61d64
chore(deps): update dependency hast-util-to-string to v3 (#5381)
* chore(deps): update dependency hast-util-to-string to v3

* 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>
2023-08-30 12:19:13 -07:00
Ali Abdalla
97c3c7b173
Move scripts from old website to CI (#5271)
* delete old version docs script

* script and workflow

* if merged

* syntax

* changes

* add missing demos

* hide state component

* fix html component demo

* fix model3d guide

* fix workflow

* fix issues with oauth and main

* demo notebooks

* add changeset

* demo notebook

* refactor into existing workflows

* remove assert in networking server

* add changeset

* Fix type check

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-08-30 11:06:52 -07:00
Jared Deckard
6466652583
Cancel Dropdown Filter (#5360)
* Reset the dropdown filter on blur

* Remove focus triggered by blurring to the label

* add changeset

---------

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@users.noreply.github.com>
2023-08-30 11:11:01 +01:00
Mehdi Bahri
4ccb9a86f1
Makes it possible to set the initial camera position for the Model3D component as a tuple of (alpha, beta, radius) (#5266)
* Allow setting alpha

* Allow setting beta and radius

* Formatting

* Change to tuple of (alpha, beta, radius)

* Renamed parameter

* Formatting

* add changeset

* add to update

* Change to tuple of (alpha, beta, radius)

* Renamed parameter

* Formatting

* Docstring for Model3D

* rename parameter

* add changeset

* type

* 180

* dupe

* 180

* linting

* lint

* lint

* add test

* Formatting in docstring + added what unit the angles are

* Added babylon types to model3d's package.json

* pnpm lockfile

* Type narrowing of helperCamera + assumed not null

* refactor

* docstring

* lint

* type checking

* fix test

---------

Co-authored-by: Mehdi <mehdi.bahri@epicgames.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-08-29 17:02:05 -07:00
Freddy Boulton
119c834331
Faster reload mode (#5267)
* This works

* Add code

* Final touches

* Lint

* Fix bug in other dirs

* add changeset

* Reload

* lint + test

* Load from frontend

* add changeset

* Use key

* tweak frontend config generation

* tweak

* WIP ipython

* Fix robust

* fix

* Fix for jupyter notebook

* Add checks

* Lint frontend

* Undo demo changes

* add changeset

* Use is_in_or_equal

* python 3.11 changes and no if __name__

* Forward sys.argv + guide

* 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-08-29 17:29:15 -04:00
renovate[bot]
63b7a3c85e
chore(deps): update dependency @storybook/addon-svelte-csf to v4 (#5364)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-29 12:02:44 -07:00
renovate[bot]
61803c6545
chore(deps): update dependency extendable-media-recorder to v9 (#5370)
* chore(deps): update dependency extendable-media-recorder to v9

* 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>
2023-08-29 12:02:35 -07:00
Dawood Khan
0cc7e2dcf6
Hide avatar when message none (#5366)
* hide avatar when message none

* add changeset

* frontend test and story

* test fix

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-08-29 14:40:10 -04:00
Abubakar Abid
b27f758325
Change markdown rendering to set breaks to false (#5368)
* change markdown rendering to set breaks to false

* add changeset

* update stories

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-29 11:20:41 -07:00