Spaces:
Runtime error
Runtime error
guimcc
commited on
Commit
•
2ec89b4
1
Parent(s):
bdb2d13
version changes
Browse files- app.py +3 -3
- 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
|
22 |
dataset = load_dataset("Chris1/cityscapes", split="validation")
|
23 |
-
|
24 |
-
|
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
|