File size: 1,434 Bytes
f6bcba8
 
 
 
 
 
 
 
87823a5
f6bcba8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87823a5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# %%
import gradio as gr


def sentence_builder(model, dataset):
    return f"Model card for {model} and {dataset}."


iface = gr.Interface(
    sentence_builder,
    [
        gr.Dropdown(
            ["microsoft/resnet-34", "microsoft/resnet-50"], label="Model", info="Select a model to use for testing."
        ),
        gr.Dropdown(
            ["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=[
        ["microsoft/resnet-34", "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()