Kevin Fink
commited on
Commit
·
57918ff
1
Parent(s):
0314370
init
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def fine_tune_model(model_name, dataset_name, hub_id, api_key, num_epochs, batch
|
|
39 |
|
40 |
# Tokenize the dataset
|
41 |
def tokenize_function(examples):
|
42 |
-
max_length =
|
43 |
# Assuming 'text' is the input and 'target' is the expected output
|
44 |
model_inputs = tokenizer(examples['text'], max_length=max_length, truncation=True)
|
45 |
|
@@ -110,7 +110,7 @@ try:
|
|
110 |
gr.Textbox(label="HF API token"),
|
111 |
gr.Slider(minimum=1, maximum=10, value=3, label="Number of Epochs", step=1),
|
112 |
gr.Slider(minimum=1, maximum=16, value=1, label="Batch Size", step=1),
|
113 |
-
gr.Slider(minimum=1, maximum=1000, value=1, label="Learning Rate (e-
|
114 |
gr.Slider(minimum=1, maximum=100, value=1, label="Gradient accumulation (e-1)", step=1),
|
115 |
],
|
116 |
outputs="text",
|
|
|
39 |
|
40 |
# Tokenize the dataset
|
41 |
def tokenize_function(examples):
|
42 |
+
max_length = 16
|
43 |
# Assuming 'text' is the input and 'target' is the expected output
|
44 |
model_inputs = tokenizer(examples['text'], max_length=max_length, truncation=True)
|
45 |
|
|
|
110 |
gr.Textbox(label="HF API token"),
|
111 |
gr.Slider(minimum=1, maximum=10, value=3, label="Number of Epochs", step=1),
|
112 |
gr.Slider(minimum=1, maximum=16, value=1, label="Batch Size", step=1),
|
113 |
+
gr.Slider(minimum=1, maximum=1000, value=1, label="Learning Rate (e-6)", step=1),
|
114 |
gr.Slider(minimum=1, maximum=100, value=1, label="Gradient accumulation (e-1)", step=1),
|
115 |
],
|
116 |
outputs="text",
|