bstraehle commited on
Commit
12d90c5
1 Parent(s): d9a378a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -32,10 +32,10 @@ def fine_tune_model(base_model_name, dataset_name):
32
 
33
  print("### Dataset")
34
  print(dataset)
35
- print("###")
36
- print(dataset["train"][:5])
37
- print("###")
38
- print(dataset["test"][:5])
39
  print("###")
40
 
41
  # Load model
@@ -57,15 +57,17 @@ def fine_tune_model(base_model_name, dataset_name):
57
 
58
  print("### Pre-processed dataset")
59
  print(dataset)
60
- print("###")
61
- print(dataset["train"][:5])
62
- print("###")
63
- print(dataset["test"][:5])
64
  print("###")
65
 
66
  # Split dataset into training and validation sets
67
- train_dataset = dataset["train"] #.shuffle(seed=42).select(range(1000))
68
- test_dataset = dataset["test"] #.shuffle(seed=42).select(range(100))
 
 
69
 
70
  print("### Training dataset")
71
  print(train_dataset)
 
32
 
33
  print("### Dataset")
34
  print(dataset)
35
+ print("### Train example")
36
+ print(dataset["train"][:1])
37
+ print("### Test example")
38
+ print(dataset["test"][:1)
39
  print("###")
40
 
41
  # Load model
 
57
 
58
  print("### Pre-processed dataset")
59
  print(dataset)
60
+ print("### Train example")
61
+ print(dataset["train"][:1])
62
+ print("### Test example")
63
+ print(dataset["test"][:1)
64
  print("###")
65
 
66
  # Split dataset into training and validation sets
67
+ #train_dataset = dataset["train"]
68
+ #test_dataset = dataset["test"]
69
+ train_dataset = dataset["train"].shuffle(seed=42).select(range(100))
70
+ test_dataset = dataset["test"].shuffle(seed=42).select(range(10))
71
 
72
  print("### Training dataset")
73
  print(train_dataset)