tcapelle commited on
Commit
be81fab
β€’
1 Parent(s): fef7bb1

add slider and link

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -22,21 +22,18 @@ sb = st.sidebar
22
  sb.title("Train your model")
23
  # wandb_token = sb.text_input("paste your wandb Api key if you want: https://wandb.ai/authorize", type="password")
24
 
25
-
26
  # wandb.login(key=wandb_token)
27
  wandb.login(anonymous="must")
28
  api = wandb.Api()
29
 
30
  st.success(f"You should see a new run named **{run_name}**, it\'ll have a green circle while it\'s still active")
31
 
32
-
33
  # render wandb dashboard
34
  components.html(get_project(api, project, entity), height=HEIGHT)
35
 
36
  # run params
37
  runs = 1
38
- epochs = sb.number_input('Number of epochs:', min_value=1, max_value=1000, value=100)
39
-
40
 
41
 
42
  pseudo_code = """
@@ -53,10 +50,13 @@ for i in range(epochs):
53
 
54
  sb.write(pseudo_code)
55
 
 
56
  # train model
57
  if sb.button("Run Example"):
58
 
59
  print("Running training")
60
  for i in range(runs):
61
  my_bar = sb.progress(0)
62
- train(name=run_name, project=project, entity=entity, epochs=epochs, bar=my_bar)
 
 
 
22
  sb.title("Train your model")
23
  # wandb_token = sb.text_input("paste your wandb Api key if you want: https://wandb.ai/authorize", type="password")
24
 
 
25
  # wandb.login(key=wandb_token)
26
  wandb.login(anonymous="must")
27
  api = wandb.Api()
28
 
29
  st.success(f"You should see a new run named **{run_name}**, it\'ll have a green circle while it\'s still active")
30
 
 
31
  # render wandb dashboard
32
  components.html(get_project(api, project, entity), height=HEIGHT)
33
 
34
  # run params
35
  runs = 1
36
+ epochs = sb.slider('Number of epochs:', min_value=100, max_value=500, value=100)
 
37
 
38
 
39
  pseudo_code = """
 
50
 
51
  sb.write(pseudo_code)
52
 
53
+ sb.write("Click πŸ‘‡ to start logging")
54
  # train model
55
  if sb.button("Run Example"):
56
 
57
  print("Running training")
58
  for i in range(runs):
59
  my_bar = sb.progress(0)
60
+ train(name=run_name, project=project, entity=entity, epochs=epochs, bar=my_bar)
61
+
62
+ st.subheader("Check our πŸ”₯ [Pytorch Intro colab](https://wandb.me/intro) πŸ”₯")