Introducing Gradio 5.0
Read MoreIntroducing Gradio 5.0
Read MoreNew to Gradio? Start here: Getting Started
See the Release History
To install Gradio from main, run the following command:
pip install https://gradio-builds.s3.amazonaws.com/69acfebffd0d3479a40352de19c8763863557428/gradio-5.4.0-py3-none-any.whl
*Note: Setting share=True
in
launch()
will not work.
gradio.SimpleCSVLogger(···)
import gradio as gr
def image_classifier(inp):
return {'cat': 0.3, 'dog': 0.7}
demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label",
flagging_callback=SimpleCSVLogger())
gradio.CSVLogger(···)
import gradio as gr
def image_classifier(inp):
return {'cat': 0.3, 'dog': 0.7}
demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label",
flagging_callback=CSVLogger())
simplify_file_data: bool
= True
If True, the file data will be simplified before being written to the CSV file. If CSVLogger is being used to cache examples, this is set to False to preserve the original FileData class
verbose: bool
= True
If True, prints messages to the console about the dataset file creation
dataset_file_name: str | None
= None
The name of the dataset file to be created (should end in ".csv"). If None, the dataset file will be named "dataset1.csv" or the next available number.