Spaces:
Sleeping
Sleeping
nileshhanotia
commited on
Commit
•
7ff94d5
1
Parent(s):
729d1dd
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,8 @@ token = st.secrets["HF_TOKEN"]
|
|
15 |
|
16 |
# Load the tokenizer and model
|
17 |
try:
|
18 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name,
|
19 |
-
model = AutoModelForCausalLM.from_pretrained(model_name,
|
20 |
st.write("Model and tokenizer loaded successfully!")
|
21 |
except Exception as e:
|
22 |
st.error(f"An error occurred while loading the model: {e}")
|
@@ -43,7 +43,7 @@ except Exception as e:
|
|
43 |
# Training arguments for fine-tuning
|
44 |
training_args = TrainingArguments(
|
45 |
output_dir="./results",
|
46 |
-
|
47 |
learning_rate=2e-5,
|
48 |
per_device_train_batch_size=1,
|
49 |
num_train_epochs=3,
|
|
|
15 |
|
16 |
# Load the tokenizer and model
|
17 |
try:
|
18 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, token=token)
|
19 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, token=token)
|
20 |
st.write("Model and tokenizer loaded successfully!")
|
21 |
except Exception as e:
|
22 |
st.error(f"An error occurred while loading the model: {e}")
|
|
|
43 |
# Training arguments for fine-tuning
|
44 |
training_args = TrainingArguments(
|
45 |
output_dir="./results",
|
46 |
+
eval_strategy="epoch", # Use `eval_strategy` instead of `evaluation_strategy`
|
47 |
learning_rate=2e-5,
|
48 |
per_device_train_batch_size=1,
|
49 |
num_train_epochs=3,
|