sft / app.py
bstraehle's picture
Update app.py
b937d88 verified
raw
history blame
613 Bytes
import gradio as gr
import torch
import pandas as pd
from datasets import Dataset, load_dataset
from peft import LoraConfig, PeftModel, prepare_model_for_kbit_training, get_peft_model
from transformers import (AutoTokenizer, BitsAndBytesConfig, TrainingArguments, AutoModelForSequenceClassification, Trainer, EarlyStoppingCallback, DataCollatorWithPadding)
import bitsandbytes as bnb
import evaluate
import numpy as np
import random
def process(model, dataset):
dataset_imdb = load_dataset(dataset)
return "Done"
demo = gr.Interface(fn=process, inputs=["model", "dataset"], outputs="text")
demo.launch()