Update app.py
Browse files
app.py
CHANGED
@@ -308,11 +308,12 @@ def test(net, testloader):
|
|
308 |
accuracy = metric.compute()["accuracy"]
|
309 |
return loss, accuracy
|
310 |
|
311 |
-
net = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=2).to(DEVICE)
|
312 |
|
313 |
def main():
|
314 |
st.write("## Federated Learning with dynamic models and datasets for mobile devices")
|
315 |
dataset_name = st.selectbox("Dataset", ["imdb", "amazon_polarity", "ag_news"])
|
|
|
|
|
316 |
model_name = st.selectbox("Model", ["facebook/hubert-base-ls960","bert-base-uncased", "distilbert-base-uncased"])
|
317 |
NUM_CLIENTS = st.slider("Number of Clients", min_value=1, max_value=10, value=2)
|
318 |
NUM_ROUNDS = st.slider("Number of Rounds", min_value=1, max_value=10, value=3)
|
|
|
308 |
accuracy = metric.compute()["accuracy"]
|
309 |
return loss, accuracy
|
310 |
|
|
|
311 |
|
312 |
def main():
|
313 |
st.write("## Federated Learning with dynamic models and datasets for mobile devices")
|
314 |
dataset_name = st.selectbox("Dataset", ["imdb", "amazon_polarity", "ag_news"])
|
315 |
+
net = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=2).to(DEVICE)
|
316 |
+
|
317 |
model_name = st.selectbox("Model", ["facebook/hubert-base-ls960","bert-base-uncased", "distilbert-base-uncased"])
|
318 |
NUM_CLIENTS = st.slider("Number of Clients", min_value=1, max_value=10, value=2)
|
319 |
NUM_ROUNDS = st.slider("Number of Rounds", min_value=1, max_value=10, value=3)
|