Spaces:
Running
Running
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import pandas as pd
|
3 |
+
|
4 |
+
df = pd.read_csv("https://huggingface.co/datasets/stevhliu/supported-peft-models-methods/raw/main/pefty.csv")
|
5 |
+
|
6 |
+
def get_model_and_peft_method(task):
|
7 |
+
"""
|
8 |
+
Returns the model and PEFT methods that match a given task.
|
9 |
+
"""
|
10 |
+
return df[df['task'] == task].drop('task', axis=1)
|
11 |
+
|
12 |
+
demo = gr.Interface(
|
13 |
+
get_model_and_peft_method,
|
14 |
+
inputs=gr.Dropdown(["causal language modeling", "conditional generation", "sequence classification", "token classification", "text-to-image", "image classification", "image-to-text", "semantic segmentation"], label="task"),
|
15 |
+
outputs=gr.Dataframe(headers=["model", "peft method"], label="supported models and PEFT methods"),
|
16 |
+
title="Supported models and PEFT methods",
|
17 |
+
description="Discover what models and PEFT methods are supported for a given task"
|
18 |
+
)
|
19 |
+
|
20 |
+
demo.launch(debug=True)
|