Commit Graph

1177 Commits

Author SHA1 Message Date
Hannah
9a6ce6f6b0
Refactor full screen logic to be reusable (#10098) 2024-12-05 23:51:30 +00:00
Ali Abdalla
a623fafbcf
Move requirements generation in playground to playground worker (#10126)
* move requirements genereation

* formatting

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-12-04 20:48:49 -08:00
Gradio PR Bot
c5ae60780c
chore: update versions (#10082)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-04 15:04:48 -08:00
Abubakar Abid
36e95977b0
Fixes options in the streaming chatbot case (#10123)
* changed

* add changeset

* frontend

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-12-04 16:00:50 -06:00
aliabid94
b02c8b7d4f
Fix sharing on chatbot with spaces (#10125)
* changes

* add changeset

* add changeset

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-12-04 15:12:00 -06:00
Hannah
8530b6e2f9
Redesign pending bubble in Chatbot (#10099)
* redesign pending bubble in chatbot

* add changeset

* add minwidth to image frame

* add changeset

* adjust bubble margin for avatars

* ensure iconbuttonwrapper doesnt get cut off

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-12-04 14:41:23 -06:00
aliabid94
ce5680f10f
Add event and gr.Select data support in gr.render blocks (#10114)
* changes

* add changeset

* changes

* changes

* add changeset

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-12-04 13:42:30 -06:00
aliabid94
97d647ecfd
Fix state changes within a gr.render (#10095)
* changes

* add changeset

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-12-04 12:10:31 -06:00
aliabid94
de42c85661
fix every= support in render (#10113)
* changes

* add changeset

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-12-04 10:39:07 -06:00
郭文涛
e450674ce4
add webcam_height and webcam_width to specify the resolution of the Webcam (#10032)
* add  webcam_height and webcam_width

* update

* A dictionary that allows developers to specify custom media constraints for the webcam stream. This parameter provides flexibility to control the video stream's properties, such as resolution, frame rate, and facing mode (e.g., front or rear camera on mobile devices). Overrides the default height and width settings when provided.

* add changeset

* add code

* Add code

* add changeset

* Fix tests

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2024-12-03 19:01:47 -05:00
Ali Abdalla
ec10aa3b9b
Fix paramviewer descriptions to only render markdown links (#10096)
* fix paramviewer to only render markdown links

* switch / to use md links

* add changeset

* change docstring

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-12-02 15:59:08 -08:00
Abubakar Abid
01b919f04b
Support additional_outputs in gr.ChatInterface (#10071)
* artifacts

* add changeset

* chatinterface

* guide fixes

* example

* zerogpu

* Revert "zerogpu"

This reverts commit 4d7b5882ae.

* changes

* submit fn

* chat interface

* changes

* add changeset

* notebook

* lint

* type

* regex

* add changeset

* fixes

* line

* fixes

* formatting

* change

* change

* add guard

* link to playground demo

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2024-12-02 16:16:07 -05:00
Yuichiro Tachibana (Tsuchiya)
6cc13f55e0
Playground exclude unavailable packages (#9998)
* Move DemosLite.svelte to DemosLite/DemosLite.svelte

* Update the playground to check if each package name inferred by LLM exists on PyPI

* add changeset

* Restore the worker url

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-12-02 01:37:17 +00:00
Ali Abdalla
b2a21c643d
Add HTML support to paramviewer descriptions (#10083) 2024-11-30 21:16:34 -08:00
Yuichiro Tachibana (Tsuchiya)
873dab5bce
Fix the Playground to ignore comments in the requirements text (#10073)
* Fix the Playground to ignore comments in the requirements text

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-30 09:29:11 +09:00
Yuichiro Tachibana (Tsuchiya)
bf03d54e2f
Fix to call bootstrap_custom_element() if the script is loaded after the DOMContentLoaded event (#10077)
* Fix to call bootstrap_custom_element() if the script is loaded after the DOContentLoaded event

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-29 12:21:54 -08:00
Gradio PR Bot
4d67d39477
chore: update versions (#10067)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-28 14:23:37 -05:00
Hannah
afd75def9e
Fix label placement in gr.HTML (#10069)
* remove unneeded label-container

* add changeset

* add block padding to prevent breaking change

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-11-28 19:13:56 +00:00
Abubakar Abid
368ba73106
Update Chat Interface examples and add more LLM libraries and API providers (#10025)
* docs

* guide

* langchain

* changes

* reduce

* llama index example

* demo

* demo

* reduce

* add comment

* fix langchain example

* reduce

* guide

* openai demo

* changes

* sambanova

* hyperbolic

* push

* guide

* add chatbot demos to playground

* add changeset

* claude

* restore

* fix data model

* add changeset

* claude demo

* more changes

* Update guides/05_chatbots/02_chat_interface_examples.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/05_chatbots/02_chat_interface_examples.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/05_chatbots/02_chat_interface_examples.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/05_chatbots/02_chat_interface_examples.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/05_chatbots/02_chat_interface_examples.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/05_chatbots/02_chat_interface_examples.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* more examples

* reduce

* changes

* notebooks

* lint

* Fixes creating chatbot fast guide and website build issues   (#10060)

* fixes

* formatting

* examples

---------

Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-28 14:07:39 -05:00
aliabid94
19d4ee62c3
Allow concurrent renders (#10059)
* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* Update gradio/blocks.py

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

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-11-28 12:42:15 -05:00
Gradio PR Bot
b400706fb6
chore: update versions (#9970)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-27 18:10:49 -05:00
Hannah
5da6c1da47
Ensure chatbot messages are aligned correctly (#10055)
* tweak text-align logic

* * remove redundant text-align
* fix message-buttons z-index

* add changeset

* add changeset

* revert comments

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-27 17:55:29 -05:00
Hannah
e0ed480798
Remove duplicated share icon in gr.Chatbot (#10056)
* fix double share button

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-27 17:55:20 -05:00
Hannah
458941c508
Allow full screen mode in interactive gr.Image (#10054)
* allow full screen mode in interactive image

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-11-27 15:03:12 -05:00
郭文涛
5d36c8088d
Add gr.datetime a param interactive:bool (#10013)
* add gr.datetime a param 'interactive:bool'

* update html with `container`

* repair

* add changeset

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abid <aliabid94@gmail.com>
2024-11-27 19:41:35 +00:00
Hannah
a2a3cd466c
Add show_heading param to gr.Label (#9987)
* add hide_heading param

* amend hide heading logic for single labels

* add changeset

* add changeset

* fix test

* tweak docstring

* hide_heading -> show_heading

* add changeset

* set show_headings to true

* lint

* fix hidden top label

* fix background fill for ms and webkit

* add changeset

* Update gradio/components/label.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>
2024-11-27 19:26:23 +00:00
Hannah
c1fa13c9c0
Ensure ImageEditor brush colour is updated when changed (#10041)
* fix selected_color logic

* 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>
2024-11-27 18:08:45 +00:00
Hannah
d0b74ba281
Ensure toolbar stays visible for large images in ImageEditor (#10037)
* recalculate canvas dimensions for images larger than max_height

* add changeset

* tweak default height logic

* tweak height logic

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-26 16:03:10 +00:00
Freddy Boulton
7b8f1e447a
Fix double gallery close button in preview (#10016)
* Add code

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-25 12:13:38 -05:00
Abubakar Abid
db162bfc59
enable lazy caching for chatinterface (#10015)
* lazy chat

* add changeset

* lazy caching

* lazy caching

* revert

* fix this

* changes

* changes

* format

* changes

* add env variable

* revert

* add changeset

* lazy

* fix

* chat interface

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-23 20:24:55 +00:00
Abubakar Abid
369a44e7f8
Add ability to provide preset response options in gr.Chatbot / gr.ChatInterface (#9989)
* options

* add changeset

* list

* types

* add changeset

* types

* docs

* changes

* more docs

* chatbot

* changes

* changes

* changes

* format

* notebooks

* typedict

* docs

* console logs

* docs

* docs

* styling

* docs

* Update guides/05_chatbots/01_creating-a-chatbot-fast.md

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

* Update guides/05_chatbots/01_creating-a-chatbot-fast.md

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

* Update guides/05_chatbots/01_creating-a-chatbot-fast.md

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

* Update guides/05_chatbots/01_creating-a-chatbot-fast.md

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

* Update guides/05_chatbots/02_chat_interface_examples.md

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

* Update guides/05_chatbots/01_creating-a-chatbot-fast.md

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

* restore

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2024-11-22 00:19:52 +00:00
郭文涛
4aa0e887a6
Add container parameter to gr.HTML component (#10014)
* add gr.datetime a param 'interactive:bool'

* update html with `container`

* delete irrelevant update

* add changeset

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-21 19:54:19 +00:00
Hannah
e9f0d0315d
Ensure Enter is correctly handled in Safari and Firefox (#9945)
* explicity handle enter

* add changeset

* add handle keydown

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-11-21 17:33:23 +00:00
Hannah
0879be78b3
Ensure show_label param is used in HighlightedText (#10004)
* use show_label param

* add changeset

* add changeset

* * remove empty label spacing
* increase empty area

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-11-20 23:34:40 +00:00
Abubakar Abid
c3324d7f7f
Fix issues related to examples and example caching in gr.ChatInterface (#9990)
* changes

* changes

* add functional tests

* add changeset

* revert

* example format

* chat interface

* replace attribute with str

* replace attribute with function

* fix tests

* changes

* fix

* more changes

* changes

* changes

* demo

* more changes

* typing

* demos

* test

* changes

* changes

* functional tests

* add changeset

* fix pytest

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-20 12:57:59 -08:00
Abubakar Abid
e7629f7eac
Adds copy event to gr.Markdown, gr.Chatbot, and gr.Textbox (#9979)
* add copy event

* add changeset

* test

* demo

* changes

* add changeset

* add list format

* typing

* notebook

* copy events'

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-19 19:58:19 +00:00
Hannah
2afcad80ab
Allow negative values in gr.Slider (#9988)
* remove fallback values in slider

* story

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-19 15:24:18 +00:00
Alessandro Molina
2e2cdbfb60
Fix css preload when serving from proxied subpaths (#9822)
* Fix assets when serving from subpath

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: pngwn <hello@pngwn.io>
2024-11-16 08:54:49 -08:00
Gradio PR Bot
4d520a8a7b
chore: update versions (#9908)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-15 16:16:39 -08:00
Hannah
08f4b8b000
Add allow_file_downloads param to allow downloading image/video/audio media in chatbot (#9905)
* add allow_file_downloads param

* add download btn for markdown images

* add changeset

* tweak

* fix test

* remove param

* revert param removal

* fix show logic

* rename show_download_button to allow_file_downloads

* change default to True

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-11-15 15:50:32 -08:00
Hannah
cfb62bfdb5
Allow dataframe column content to wrap (#9949)
* camend header-content css wrap

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-15 13:08:38 -08:00
Abubakar Abid
fc06fe41f0
Add ability to read and write from LocalStorage (#9950)
* localstate

* add changeset

* changes

* changes

* changes

* add changeset

* changes

* add changeset

* format

* notebook

* some changes

* add changeset

* format

* fix

* changes

* fix js lint and ts

* add changeset

* fix pytest

* component demo

* rename

* rename

* notebooks

* revert

* changes

* revert

* revert

* revert

* changes

* changes

* format

* fix

* notebook

* docstring

* guide

* types

* cleanup

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-15 12:56:36 -08:00
Hannah
74b4ff0e61
Ensure radio radius is consistent with checkbox radius (#9901)
* ensure radio uses checkbox radius var

* add changeset

* amend checkbox group label radius

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-15 12:33:59 +00:00
Abubakar Abid
a966e9f753
Hide upload button after upload when file_count="single" (#9946)
* format'

* add changeset

* add story

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2024-11-12 14:39:57 -08:00
Hannah
c0cf80bddd
Allow datetime value to be null (#9897)
* change valid date check

* add changeset

* move clear event and dispatch clear

* remove clear event

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-07 23:12:41 +00:00
Hannah
f523c915d3
Ensure dropped files are validated in MultimediaTextbox (#9904)
* add logic to validate dropped files

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-06 19:40:10 +00:00
Gradio PR Bot
b5eaba1d6d
chore: update versions (#9874)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-04 14:59:10 -08:00
Yuichiro Tachibana (Tsuchiya)
b6725cf6c1
Lite auto-load imported modules with pyodide.loadPackagesFromImports (#9726)
* Call pyodide.loadPackagesFromImports() for each Python file and dispatch an event including the result

* Fix

* Call pyodide.loadPackagesFromImports from run_code

* Update DemosLite to listen the modules-auto-loaded event and upload the requirements automatically

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-11-04 13:50:27 -08:00
Freddy Boulton
e10bbd236f
Fix live interfaces for audio/image streaming (#9883)
* Fix live interfaces for audio/image streaming

* add changeset

* code

* code

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-11-04 16:20:48 -05:00
Abubakar Abid
7d77024cb8
Fix dataframe height increasing on scroll (#9892)
* changes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-11-04 10:39:04 -08:00