Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,17 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
def
|
4 |
-
|
|
|
5 |
|
6 |
-
demo = gr.Interface(fn=
|
7 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
import torch
|
3 |
+
import pandas as pd
|
4 |
+
from datasets import Dataset, load_dataset
|
5 |
+
from peft import LoraConfig, PeftModel, prepare_model_for_kbit_training, get_peft_model
|
6 |
+
from transformers import (AutoTokenizer, BitsAndBytesConfig, TrainingArguments, AutoModelForSequenceClassification, Trainer, EarlyStoppingCallback, DataCollatorWithPadding)
|
7 |
+
import bitsandbytes as bnb
|
8 |
+
import evaluate
|
9 |
+
import numpy as np
|
10 |
+
import random
|
11 |
|
12 |
+
def process(model, dataset):
|
13 |
+
dataset_imdb = load_dataset(dataset)
|
14 |
+
return "Done"
|
15 |
|
16 |
+
demo = gr.Interface(fn=process, inputs=["model", "dataset"], outputs="text")
|
17 |
demo.launch()
|