File size: 613 Bytes
083fde1
b937d88
 
 
 
 
 
 
 
 
083fde1
b937d88
 
 
083fde1
b937d88
083fde1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()