Spaces:
Runtime error
Runtime error
# %% | |
import pandas as pd | |
df = pd.read_csv("data.csv") | |
df | |
# %% | |
import gradio as gr | |
def sentence_builder(model, dataset): | |
return f"Safety card for {model} and {dataset}." | |
iface = gr.Interface( | |
sentence_builder, | |
[ | |
gr.Dropdown( | |
list(df["friendly_name"]), label="Model", info="Select a model to use for testing." | |
), | |
gr.Dropdown( | |
["marmal88/skin_cancer"], value="marmal88/skin_cancer", label="Dataset", info="Select the sampling dataset to use for testing." | |
), | |
#gr.CheckboxGroup(["USA", "Japan", "Pakistan"], label="Countries", info="Where are they from?"), | |
#gr.Radio(["park", "zoo", "road"], label="Location", info="Where did they go?"), | |
#gr.Dropdown( | |
# ["ran", "swam", "ate", "slept"], value=["swam", "slept"], multiselect=True, label="Activity", info="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed auctor, nisl eget ultricies aliquam, nunc nisl aliquet nunc, eget aliquam nisl nunc vel nisl." | |
#), | |
#gr.Checkbox(label="Morning", info="Did they do it in the morning?"), | |
], | |
gr.Label(num_top_classes=4), | |
examples=[ | |
["ViT", "marmal88/skin_cancer"], | |
#[2, "cat", ["Japan", "Pakistan"], "park", ["ate", "swam"], True], | |
#[4, "dog", ["Japan"], "zoo", ["ate", "swam"], False], | |
#[10, "bird", ["USA", "Pakistan"], "road", ["ran"], False], | |
#[8, "cat", ["Pakistan"], "zoo", ["ate"], True], | |
] | |
) | |
iface.launch() | |
# %% | |