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="PEFT methods", description="Discover compatible PEFT methods for officially supported models for a given task." ) demo.launch(debug=True)