Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add styles to gallery component #3586

Merged
merged 67 commits into from
Apr 6, 2023
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
5c00a30
update gallery styles
dawoodkhan82 Mar 22, 2023
1c0a71b
Merge branch 'main' into gallery-style
dawoodkhan82 Mar 22, 2023
40433fa
Merge branch 'main' into gallery-style
dawoodkhan82 Mar 23, 2023
b3a06e5
Set theme name from load (#3595)
freddyaboulton Mar 23, 2023
d306d52
Trigger event when Slider number input is released (#3589)
freddyaboulton Mar 23, 2023
c59a4c1
Sets up the Python `gradio` client (#3300)
abidlabs Mar 23, 2023
d2ccec2
Translate "or" for i18n (#3599)
freddyaboulton Mar 24, 2023
4c0e56e
Fixes Blocks exit issue (#3600)
abidlabs Mar 24, 2023
632ab4f
Use gradio-api-server for telemetry (#3488)
dawoodkhan82 Mar 24, 2023
674bb02
Simplify tests (#3608)
abidlabs Mar 24, 2023
c8f7cdf
fix wc error in dev mode (#3572)
pngwn Mar 24, 2023
27abab5
A few small fixes to docs / demos (#3611)
abidlabs Mar 24, 2023
80b00af
Add docs for HF Json saver (#3604)
osanseviero Mar 27, 2023
c520985
ensure css loads before mounting app (#3573)
pngwn Mar 27, 2023
3406e5b
fix issue with missing version (#3632)
aliabd Mar 27, 2023
a4b048c
Fixes chatbot autoscroll + Textbox lines > 20 issue (#3637)
dawoodkhan82 Mar 27, 2023
1dc651f
Fix embedded demos (#3638)
freddyaboulton Mar 27, 2023
d63f180
Add Windows CI (#3628)
space-nuko Mar 27, 2023
46b7bd0
move files (#3605)
pngwn Mar 27, 2023
ac740a9
Support empty lists being used in `gr.Dataframe` (#3646)
space-nuko Mar 27, 2023
3962904
Fix windows flake (#3650)
abidlabs Mar 28, 2023
393dc46
Raise errror if event queued but queue is not enabled (#3640)
freddyaboulton Mar 28, 2023
1735515
Copy everything in website Dockerfile, fix build issues (#3659)
aliabd Mar 28, 2023
d0fde4a
Correct the documentation of `gr.File` component (#3660)
RussellLuo Mar 28, 2023
36974b8
Nit in ValueError (#3669)
osanseviero Mar 28, 2023
9c29653
Load upstream theme (#3641)
abidlabs Mar 28, 2023
3c50d84
Add job for python client ci (#3674)
freddyaboulton Mar 28, 2023
a4f039d
Hide dropdown if in single-select mode (#3678)
space-nuko Mar 29, 2023
6f4da1c
Fix default parameters value and gr.Progress in same function (#3671)
space-nuko Mar 29, 2023
057c29d
warning
dawoodkhan82 Mar 29, 2023
1a877ac
Merge branch 'main' into gallery-style
dawoodkhan82 Mar 29, 2023
4f6c709
changelog
dawoodkhan82 Mar 29, 2023
166e310
ghangelog
dawoodkhan82 Mar 29, 2023
9d4d489
changelog
dawoodkhan82 Mar 29, 2023
7ce9a71
object fit optional
dawoodkhan82 Mar 29, 2023
60675d0
Merge branch 'main' into gallery-style
pngwn Mar 29, 2023
15fce3c
Add status for Python Client Jobs (#3645)
freddyaboulton Mar 29, 2023
b9db510
Fix broken spaces in docs (#3698)
aliabd Mar 29, 2023
015bf3e
Add download button for video (#3581)
freddyaboulton Mar 29, 2023
d987699
Fix outdated sharing your app guide (#3699)
aliabd Mar 29, 2023
e9c6fcd
Add orig_name field to video outputs (#3700)
freddyaboulton Mar 30, 2023
76fbd36
Theme builder (#3664)
aliabid94 Mar 30, 2023
a0a198d
fix dropdowns, release 3.24 (#3713)
aliabid94 Mar 30, 2023
4368296
New Version Docs (#3715)
github-actions[bot] Mar 30, 2023
a7b9434
Fix chatbot newline issue (#3717)
aliabid94 Mar 31, 2023
b43a318
New Version Docs (#3720)
github-actions[bot] Mar 31, 2023
e9c8994
Fix Serializer Mapping (#3722)
freddyaboulton Apr 1, 2023
64181c3
Fix some bugs related to Python client (#3721)
abidlabs Apr 2, 2023
090da90
node support for js client (#3692)
pngwn Apr 3, 2023
b146382
Support IPv6 addresses for --server-name (#3695)
dsully Apr 3, 2023
8795665
Increase timeout for analytics request + remove exception print (#3647)
dawoodkhan82 Apr 3, 2023
a3048e0
Switch linting to Ruff (#3710)
akx Apr 3, 2023
15e9207
Fix missing docstrings (new PR) (#3740)
abidlabs Apr 3, 2023
b82e6e0
import (#3742)
abidlabs Apr 4, 2023
117ae1d
Import Literal from typing extensions in client (#3741)
freddyaboulton Apr 4, 2023
3c6c621
Access http token for ws connection (#3735)
freddyaboulton Apr 4, 2023
b90e052
Add root_url to serializers in gradio_client (#3736)
freddyaboulton Apr 4, 2023
8e93f8a
CI tweaks (#3752)
freddyaboulton Apr 4, 2023
b41335a
Adds a pypi release action for the gradio python client (#3743)
abidlabs Apr 4, 2023
3cb4b3f
Get Intermediate Results from Python Client (#3694)
freddyaboulton Apr 4, 2023
a900ca4
changes (#3760)
abidlabs Apr 4, 2023
e5356a5
Make Client Jobs Iterable (#3762)
freddyaboulton Apr 5, 2023
ca0ca00
changelog
dawoodkhan82 Apr 5, 2023
356327e
merge
dawoodkhan82 Apr 5, 2023
b66a8ed
notebooks
dawoodkhan82 Apr 5, 2023
692ce39
Merge branch 'main' into gallery-style
dawoodkhan82 Apr 5, 2023
4621c58
Merge branch 'main' into gallery-style
dawoodkhan82 Apr 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add docs for HF Json saver (#3604)
* Add docs for flagging

* Fix params

* CHANGELOG

---------

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2 people authored and dawoodkhan82 committed Mar 29, 2023
commit 80b00af0301bac899bc87782e916d8d2ac3ca3a5
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -17,9 +17,9 @@
## Documentation Changes:

- Makes some fixes to the Theme Guide related to naming of variables, by [@abidlabs](https://github.com/abidlabs) in [PR 3561](https://github.com/gradio-app/gradio/pull/3561)
- Documented `HuggingFaceDatasetJSONSaver` by [@osanseviero](https://github.com/osanseviero) in [PR 3604](https://github.com/gradio-app/gradio/pull/3604)
- Makes some additions to documentation of `Audio` and `State` components, and fixes the `pictionary` demo by [@abidlabs](https://github.com/abidlabs) in [PR 3611](https://github.com/gradio-app/gradio/pull/3611)


## Testing and Infrastructure Changes:

- Removed heavily-mocked tests related to comet_ml, wandb, and mlflow as they added a significant amount of test dependencies that prevented installation of test dependencies on Windows environemnts. By [@abidlabs](https://github.com/abidlabs) in [PR 3608](https://github.com/gradio-app/gradio/pull/3608)
29 changes: 17 additions & 12 deletions gradio/flagging.py
Original file line number Diff line number Diff line change
@@ -365,14 +365,24 @@ def flag(
return line_count


@document()
class HuggingFaceDatasetJSONSaver(FlaggingCallback):
"""
A FlaggingCallback that saves flagged data to a Hugging Face dataset in JSONL format.
A callback that saves flagged data (both the input and output data)
to a Hugging Face dataset in JSONL format.

Each data sample is saved in a different JSONL file,
allowing multiple users to use flagging simultaneously.
Saving to a single CSV would cause errors as only one user can edit at the same time.

Example:
import gradio as gr
hf_writer = gr.HuggingFaceDatasetJSONSaver(HF_API_TOKEN, "image-classification-mistakes")
def image_classifier(inp):
return {'cat': 0.3, 'dog': 0.7}
demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label",
allow_flagging="manual", flagging_callback=hf_writer)
Guides: using_flagging
"""

def __init__(
@@ -384,17 +394,12 @@ def __init__(
verbose: bool = True,
):
"""
Params:
hf_token (str): The token to use to access the huggingface API.
dataset_name (str): The name of the dataset to save the data to, e.g.
"image-classifier-1"
organization (str): The name of the organization to which to attach
the datasets. If None, the dataset attaches to the user only.
private (bool): If the dataset does not already exist, whether it
should be created as a private dataset or public. Private datasets
may require paid huggingface.co accounts
verbose (bool): Whether to print out the status of the dataset
creation.
Parameters:
hf_token: The token to use to access the huggingface API.
dataset_name: The name of the dataset to save the data to, e.g. "image-classifier-1"
organization: The name of the organization to which to attach the datasets. If None, the dataset attaches to the user only.
private: If the dataset does not already exist, whether it should be created as a private dataset or public. Private datasets may require paid huggingface.co accounts
verbose: Whether to print out the status of the dataset creation.
"""
self.hf_token = hf_token
self.dataset_name = dataset_name