import gradio as gr import pandas as pd df = pd.read_csv("https://huggingface.co/datasets/stevhliu/supported-peft-models-methods/raw/main/pefty.csv") def get_model_and_peft_method(task): """ Returns the model and PEFT methods that match a given task. """ return df[df['task'] == task].drop('task', axis=1) demo = gr.Interface( get_model_and_peft_method, inputs=gr.Dropdown(["causal language modeling", "conditional generation", "sequence classification", "token classification", "text-to-image", "image classification", "image-to-text", "semantic segmentation"], label="task"), outputs=gr.Dataframe(headers=["model", "peft method"], label="supported models and PEFT methods"), title="Supported models and PEFT methods", description="Discover what models and PEFT methods are supported for a given task" ) demo.launch(debug=True)