guimcc commited on
Commit
2ec89b4
1 Parent(s): bdb2d13

version changes

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. requirements.txt +1 -1
app.py CHANGED
@@ -18,10 +18,10 @@ lora_model_id = "guimCC/segformer-v0-gta-cityscapes"
18
  original_model = SegformerForSemanticSegmentation.from_pretrained(original_model_id).to(device)
19
  lora_model = SegformerForSemanticSegmentation.from_pretrained(lora_model_id).to(device)
20
 
21
- # Load the dataset and select 10 random images
22
  dataset = load_dataset("Chris1/cityscapes", split="validation")
23
- #sampled_dataset = random.sample(list(dataset), 10) # Select 10 random examples
24
- sampled_dataset = dataset[:10] # Select the first 10 examples
25
 
26
  # Define your custom image processor
27
  jitter = ColorJitter(brightness=0.25, contrast=0.25, saturation=0.25, hue=0.1)
 
18
  original_model = SegformerForSemanticSegmentation.from_pretrained(original_model_id).to(device)
19
  lora_model = SegformerForSemanticSegmentation.from_pretrained(lora_model_id).to(device)
20
 
21
+ # Load the dataset and select the first 10 images
22
  dataset = load_dataset("Chris1/cityscapes", split="validation")
23
+ sampled_dataset = dataset.select(range(10)) # Select the first 10 examples
24
+
25
 
26
  # Define your custom image processor
27
  jitter = ColorJitter(brightness=0.25, contrast=0.25, saturation=0.25, hue=0.1)
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
  gradio
2
- transformers
3
  torch
4
  pillow
5
  datasets
 
1
  gradio
2
+ transformers==0.4.3
3
  torch
4
  pillow
5
  datasets