Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def train_with_bert(dataset, model_name="bert-base-uncased"):
|
|
46 |
save_total_limit=2,
|
47 |
)
|
48 |
|
49 |
-
|
50 |
model=model,
|
51 |
args=training_args,
|
52 |
train_dataset=tokenized_dataset["train"],
|
@@ -150,6 +150,6 @@ elif selected_tab == "Settings":
|
|
150 |
"use_torch": use_torch,
|
151 |
"use_bert": use_bert
|
152 |
})
|
153 |
-
if username and not os.path.exists(f"./results_{username}"):
|
154 |
-
os.makedirs(f"./results_{username}")
|
155 |
st.success("Settings saved!")
|
|
|
46 |
save_total_limit=2,
|
47 |
)
|
48 |
|
49 |
+
trainer = Trainer(
|
50 |
model=model,
|
51 |
args=training_args,
|
52 |
train_dataset=tokenized_dataset["train"],
|
|
|
150 |
"use_torch": use_torch,
|
151 |
"use_bert": use_bert
|
152 |
})
|
153 |
+
if username and not os.path.exists(f"./converted/results_{username}"):
|
154 |
+
os.makedirs(f"./converted/results_{username}")
|
155 |
st.success("Settings saved!")
|