BBrother commited on
Commit
8a57f8b
1 Parent(s): 29e7157

Update v2_3.py

Browse files
Files changed (1) hide show
  1. v2_3.py +33 -33
v2_3.py CHANGED
@@ -305,7 +305,7 @@ if CS_download_task1:
305
  os.makedirs(CS_destination_folder1, exist_ok=True)
306
  response = requests.get(CS_url1)
307
  with open(CS_target1, 'wb') as f:
308
- f.write(response.bushu)
309
 
310
  # 下载任务2
311
  CS_download_task2 = False
@@ -318,7 +318,7 @@ if CS_download_task2:
318
  os.makedirs(CS_destination_folder2, exist_ok=True)
319
  response = requests.get(CS_url2)
320
  with open(CS_target2, 'wb') as f:
321
- f.write(response.bushu)
322
 
323
  # 下载任务3
324
  CS_download_task3 = True
@@ -331,7 +331,7 @@ if CS_download_task3:
331
  os.makedirs(CS_destination_folder3, exist_ok=True)
332
  response = requests.get(CS_url3)
333
  with open(CS_target3, 'wb') as f:
334
- f.write(response.bushu)
335
 
336
  # 下载任务4
337
  CS_download_task4 = False
@@ -344,7 +344,7 @@ if CS_download_task4:
344
  os.makedirs(CS_destination_folder4, exist_ok=True)
345
  response = requests.get(CS_url4)
346
  with open(CS_target4, 'wb') as f:
347
- f.write(response.bushu)
348
 
349
  # 下载任务5
350
  CS_download_task5 = False
@@ -357,7 +357,7 @@ if CS_download_task5:
357
  os.makedirs(CS_destination_folder5, exist_ok=True)
358
  response = requests.get(CS_url5)
359
  with open(CS_target5, 'wb') as f:
360
- f.write(response.bushu)
361
 
362
  # 下载任务6
363
  CS_download_task6 = True
@@ -370,7 +370,7 @@ if CS_download_task6:
370
  os.makedirs(CS_destination_folder6, exist_ok=True)
371
  response = requests.get(CS_url6)
372
  with open(CS_target6, 'wb') as f:
373
- f.write(response.bushu)
374
 
375
  # 下载任务7
376
  CS_download_task7 = False
@@ -383,7 +383,7 @@ if CS_download_task7:
383
  os.makedirs(CS_destination_folder7, exist_ok=True)
384
  response = requests.get(CS_url7)
385
  with open(CS_target7, 'wb') as f:
386
- f.write(response.bushu)
387
 
388
  # 下载任务8
389
  CS_download_task8 = False
@@ -396,7 +396,7 @@ if CS_download_task8:
396
  os.makedirs(CS_destination_folder8, exist_ok=True)
397
  response = requests.get(CS_url8)
398
  with open(CS_target8, 'wb') as f:
399
- f.write(response.bushu)
400
 
401
  # 下载任务9
402
  CS_download_task9 = False
@@ -409,7 +409,7 @@ if CS_download_task9:
409
  os.makedirs(CS_destination_folder9, exist_ok=True)
410
  response = requests.get(CS_url9)
411
  with open(CS_target9, 'wb') as f:
412
- f.write(response.bushu)
413
 
414
  # 下载任务10
415
  CS_download_task10 = False
@@ -422,7 +422,7 @@ if CS_download_task10:
422
  os.makedirs(CS_destination_folder10, exist_ok=True)
423
  response = requests.get(CS_url10)
424
  with open(CS_target10, 'wb') as f:
425
- f.write(response.bushu)
426
 
427
  # 下载任务11
428
  CS_download_task11 = False
@@ -435,7 +435,7 @@ if CS_download_task11:
435
  os.makedirs(CS_destination_folder11, exist_ok=True)
436
  response = requests.get(CS_url11)
437
  with open(CS_target11, 'wb') as f:
438
- f.write(response.bushu)
439
 
440
  # 下载任务12
441
  CS_download_task12 = False
@@ -448,7 +448,7 @@ if CS_download_task12:
448
  os.makedirs(CS_destination_folder12, exist_ok=True)
449
  response = requests.get(CS_url12)
450
  with open(CS_target12, 'wb') as f:
451
- f.write(response.bushu)
452
 
453
  # 下载任务13
454
  CS_download_task13 = False
@@ -461,7 +461,7 @@ if CS_download_task13:
461
  os.makedirs(CS_destination_folder13, exist_ok=True)
462
  response = requests.get(CS_url13)
463
  with open(CS_target13, 'wb') as f:
464
- f.write(response.bushu)
465
 
466
 
467
 
@@ -477,7 +477,7 @@ if Lora_download_task1:
477
  response = requests.get(Lora_url1)
478
  if response.status_code == 200:
479
  with open(Lora_target1, 'wb') as f:
480
- f.write(response.bushu)
481
 
482
  # Lora任务2
483
  Lora_download_task2 = False
@@ -490,7 +490,7 @@ if Lora_download_task2:
490
  response = requests.get(Lora_url2)
491
  if response.status_code == 200:
492
  with open(Lora_target2, 'wb') as f:
493
- f.write(response.bushu)
494
 
495
  # Lora任务3
496
  Lora_download_task3 = True
@@ -503,7 +503,7 @@ if Lora_download_task3:
503
  response = requests.get(Lora_url3)
504
  if response.status_code == 200:
505
  with open(Lora_target3, 'wb') as f:
506
- f.write(response.bushu)
507
 
508
  # Lora任务4
509
  Lora_download_task4 = True
@@ -516,7 +516,7 @@ if Lora_download_task4:
516
  response = requests.get(Lora_url4)
517
  if response.status_code == 200:
518
  with open(Lora_target4, 'wb') as f:
519
- f.write(response.bushu)
520
 
521
  # Lora任务5
522
  Lora_download_task5 = False
@@ -529,7 +529,7 @@ if Lora_download_task5:
529
  response = requests.get(Lora_url5)
530
  if response.status_code == 200:
531
  with open(Lora_target5, 'wb') as f:
532
- f.write(response.bushu)
533
 
534
  # Lora任务6
535
  Lora_download_task6 = False
@@ -542,7 +542,7 @@ if Lora_download_task6:
542
  response = requests.get(Lora_url6)
543
  if response.status_code == 200:
544
  with open(Lora_target6, 'wb') as f:
545
- f.write(response.bushu)
546
 
547
 
548
  # VAE下载
@@ -556,7 +556,7 @@ VAE_target1 = f"{VAE_destination_folder1}/{VAE_filename1}"
556
  if VAE_download_task1:
557
  response = requests.get(VAE_url1)
558
  with open(VAE_target1, 'wb') as file:
559
- file.write(response.bushu)
560
 
561
  # VAE任务2
562
  VAE_download_task2 = True
@@ -568,7 +568,7 @@ VAE_target2 = f"{VAE_destination_folder2}/{VAE_filename2}"
568
  if VAE_download_task2:
569
  response = requests.get(VAE_url2)
570
  with open(VAE_target2, 'wb') as file:
571
- file.write(response.bushu)
572
 
573
  # VAE任务3
574
  VAE_download_task3 = True
@@ -580,7 +580,7 @@ VAE_target3 = f"{VAE_destination_folder3}/{VAE_filename3}"
580
  if VAE_download_task3:
581
  response = requests.get(VAE_url3)
582
  with open(VAE_target3, 'wb') as file:
583
- file.write(response.bushu)
584
 
585
  # VAE任务4
586
  VAE_download_task4 = False
@@ -592,7 +592,7 @@ VAE_target4 = f"{VAE_destination_folder4}/{VAE_filename4}"
592
  if VAE_download_task4:
593
  response = requests.get(VAE_url4)
594
  with open(VAE_target4, 'wb') as file:
595
- file.write(response.bushu)
596
 
597
  # VAE任务5
598
  VAE_download_task5 = True
@@ -604,7 +604,7 @@ VAE_target5 = f"{VAE_destination_folder5}/{VAE_filename5}"
604
  if VAE_download_task5:
605
  response = requests.get(VAE_url5)
606
  with open(VAE_target5, 'wb') as file:
607
- file.write(response.bushu)
608
 
609
  # VAE任务6
610
  VAE_download_task6 = True
@@ -616,7 +616,7 @@ VAE_target6 = f"{VAE_destination_folder6}/{VAE_filename6}"
616
  if VAE_download_task6:
617
  response = requests.get(VAE_url6)
618
  with open(VAE_target6, 'wb') as file:
619
- file.write(response.bushu)
620
 
621
  # VAE任务7
622
  VAE_download_task7 = True
@@ -628,7 +628,7 @@ VAE_target7 = f"{VAE_destination_folder7}/{VAE_filename7}"
628
  if VAE_download_task7:
629
  response = requests.get(VAE_url7)
630
  with open(VAE_target7, 'wb') as file:
631
- file.write(response.bushu)
632
 
633
  # VAE任务8
634
  VAE_download_task8 = True
@@ -640,7 +640,7 @@ VAE_target8 = f"{VAE_destination_folder8}/{VAE_filename8}"
640
  if VAE_download_task8:
641
  response = requests.get(VAE_url8)
642
  with open(VAE_target8, 'wb') as file:
643
- file.write(response.bushu)
644
 
645
  # VAE任务9
646
  VAE_download_task9 = False
@@ -652,7 +652,7 @@ VAE_target9 = f"{VAE_destination_folder9}/{VAE_filename9}"
652
  if VAE_download_task9:
653
  response = requests.get(VAE_url9)
654
  with open(VAE_target9, 'wb') as file:
655
- file.write(response.bushu)
656
 
657
  # VAE任务10
658
  VAE_download_task10 = False
@@ -664,7 +664,7 @@ VAE_target10 = f"{VAE_destination_folder10}/{VAE_filename10}"
664
  if VAE_download_task10:
665
  response = requests.get(VAE_url10)
666
  with open(VAE_target10, 'wb') as file:
667
- file.write(response.bushu)
668
 
669
  # VAE任务11
670
  VAE_download_task11 = False
@@ -676,7 +676,7 @@ VAE_target11 = f"{VAE_destination_folder11}/{VAE_filename11}"
676
  if VAE_download_task11:
677
  response = requests.get(VAE_url11)
678
  with open(VAE_target11, 'wb') as file:
679
- file.write(response.bushu)
680
 
681
  # VAE任务12
682
  VAE_download_task12 = False
@@ -688,7 +688,7 @@ VAE_target12 = f"{VAE_destination_folder12}/{VAE_filename12}"
688
  if VAE_download_task12:
689
  response = requests.get(VAE_url12)
690
  with open(VAE_target12, 'wb') as file:
691
- file.write(response.bushu)
692
 
693
  # VAE任务13
694
  VAE_download_task13 = False
@@ -700,7 +700,7 @@ VAE_target13 = f"{VAE_destination_folder13}/{VAE_filename13}"
700
  if VAE_download_task13:
701
  response = requests.get(VAE_url13)
702
  with open(VAE_target13, 'wb') as file:
703
- file.write(response.bushu)
704
 
705
 
706
 
@@ -710,7 +710,7 @@ def download_file(url, destination_folder, filename):
710
  os.makedirs(destination_folder, exist_ok=True)
711
  response = requests.get(url)
712
  with open(os.path.join(destination_folder, filename), 'wb') as file:
713
- file.write(response.bushu)
714
 
715
  # _下载任务1_
716
  embeddings_download_task1 = True #@param {type:"boolean"}
 
305
  os.makedirs(CS_destination_folder1, exist_ok=True)
306
  response = requests.get(CS_url1)
307
  with open(CS_target1, 'wb') as f:
308
+ f.write(response.content)
309
 
310
  # 下载任务2
311
  CS_download_task2 = False
 
318
  os.makedirs(CS_destination_folder2, exist_ok=True)
319
  response = requests.get(CS_url2)
320
  with open(CS_target2, 'wb') as f:
321
+ f.write(response.content)
322
 
323
  # 下载任务3
324
  CS_download_task3 = True
 
331
  os.makedirs(CS_destination_folder3, exist_ok=True)
332
  response = requests.get(CS_url3)
333
  with open(CS_target3, 'wb') as f:
334
+ f.write(response.content)
335
 
336
  # 下载任务4
337
  CS_download_task4 = False
 
344
  os.makedirs(CS_destination_folder4, exist_ok=True)
345
  response = requests.get(CS_url4)
346
  with open(CS_target4, 'wb') as f:
347
+ f.write(response.content)
348
 
349
  # 下载任务5
350
  CS_download_task5 = False
 
357
  os.makedirs(CS_destination_folder5, exist_ok=True)
358
  response = requests.get(CS_url5)
359
  with open(CS_target5, 'wb') as f:
360
+ f.write(response.content)
361
 
362
  # 下载任务6
363
  CS_download_task6 = True
 
370
  os.makedirs(CS_destination_folder6, exist_ok=True)
371
  response = requests.get(CS_url6)
372
  with open(CS_target6, 'wb') as f:
373
+ f.write(response.content)
374
 
375
  # 下载任务7
376
  CS_download_task7 = False
 
383
  os.makedirs(CS_destination_folder7, exist_ok=True)
384
  response = requests.get(CS_url7)
385
  with open(CS_target7, 'wb') as f:
386
+ f.write(response.content)
387
 
388
  # 下载任务8
389
  CS_download_task8 = False
 
396
  os.makedirs(CS_destination_folder8, exist_ok=True)
397
  response = requests.get(CS_url8)
398
  with open(CS_target8, 'wb') as f:
399
+ f.write(response.content)
400
 
401
  # 下载任务9
402
  CS_download_task9 = False
 
409
  os.makedirs(CS_destination_folder9, exist_ok=True)
410
  response = requests.get(CS_url9)
411
  with open(CS_target9, 'wb') as f:
412
+ f.write(response.content)
413
 
414
  # 下载任务10
415
  CS_download_task10 = False
 
422
  os.makedirs(CS_destination_folder10, exist_ok=True)
423
  response = requests.get(CS_url10)
424
  with open(CS_target10, 'wb') as f:
425
+ f.write(response.content)
426
 
427
  # 下载任务11
428
  CS_download_task11 = False
 
435
  os.makedirs(CS_destination_folder11, exist_ok=True)
436
  response = requests.get(CS_url11)
437
  with open(CS_target11, 'wb') as f:
438
+ f.write(response.content)
439
 
440
  # 下载任务12
441
  CS_download_task12 = False
 
448
  os.makedirs(CS_destination_folder12, exist_ok=True)
449
  response = requests.get(CS_url12)
450
  with open(CS_target12, 'wb') as f:
451
+ f.write(response.content)
452
 
453
  # 下载任务13
454
  CS_download_task13 = False
 
461
  os.makedirs(CS_destination_folder13, exist_ok=True)
462
  response = requests.get(CS_url13)
463
  with open(CS_target13, 'wb') as f:
464
+ f.write(response.content)
465
 
466
 
467
 
 
477
  response = requests.get(Lora_url1)
478
  if response.status_code == 200:
479
  with open(Lora_target1, 'wb') as f:
480
+ f.write(response.content)
481
 
482
  # Lora任务2
483
  Lora_download_task2 = False
 
490
  response = requests.get(Lora_url2)
491
  if response.status_code == 200:
492
  with open(Lora_target2, 'wb') as f:
493
+ f.write(response.content)
494
 
495
  # Lora任务3
496
  Lora_download_task3 = True
 
503
  response = requests.get(Lora_url3)
504
  if response.status_code == 200:
505
  with open(Lora_target3, 'wb') as f:
506
+ f.write(response.content)
507
 
508
  # Lora任务4
509
  Lora_download_task4 = True
 
516
  response = requests.get(Lora_url4)
517
  if response.status_code == 200:
518
  with open(Lora_target4, 'wb') as f:
519
+ f.write(response.content)
520
 
521
  # Lora任务5
522
  Lora_download_task5 = False
 
529
  response = requests.get(Lora_url5)
530
  if response.status_code == 200:
531
  with open(Lora_target5, 'wb') as f:
532
+ f.write(response.content)
533
 
534
  # Lora任务6
535
  Lora_download_task6 = False
 
542
  response = requests.get(Lora_url6)
543
  if response.status_code == 200:
544
  with open(Lora_target6, 'wb') as f:
545
+ f.write(response.content)
546
 
547
 
548
  # VAE下载
 
556
  if VAE_download_task1:
557
  response = requests.get(VAE_url1)
558
  with open(VAE_target1, 'wb') as file:
559
+ file.write(response.content)
560
 
561
  # VAE任务2
562
  VAE_download_task2 = True
 
568
  if VAE_download_task2:
569
  response = requests.get(VAE_url2)
570
  with open(VAE_target2, 'wb') as file:
571
+ file.write(response.content)
572
 
573
  # VAE任务3
574
  VAE_download_task3 = True
 
580
  if VAE_download_task3:
581
  response = requests.get(VAE_url3)
582
  with open(VAE_target3, 'wb') as file:
583
+ file.write(response.content)
584
 
585
  # VAE任务4
586
  VAE_download_task4 = False
 
592
  if VAE_download_task4:
593
  response = requests.get(VAE_url4)
594
  with open(VAE_target4, 'wb') as file:
595
+ file.write(response.content)
596
 
597
  # VAE任务5
598
  VAE_download_task5 = True
 
604
  if VAE_download_task5:
605
  response = requests.get(VAE_url5)
606
  with open(VAE_target5, 'wb') as file:
607
+ file.write(response.content)
608
 
609
  # VAE任务6
610
  VAE_download_task6 = True
 
616
  if VAE_download_task6:
617
  response = requests.get(VAE_url6)
618
  with open(VAE_target6, 'wb') as file:
619
+ file.write(response.content)
620
 
621
  # VAE任务7
622
  VAE_download_task7 = True
 
628
  if VAE_download_task7:
629
  response = requests.get(VAE_url7)
630
  with open(VAE_target7, 'wb') as file:
631
+ file.write(response.content)
632
 
633
  # VAE任务8
634
  VAE_download_task8 = True
 
640
  if VAE_download_task8:
641
  response = requests.get(VAE_url8)
642
  with open(VAE_target8, 'wb') as file:
643
+ file.write(response.content)
644
 
645
  # VAE任务9
646
  VAE_download_task9 = False
 
652
  if VAE_download_task9:
653
  response = requests.get(VAE_url9)
654
  with open(VAE_target9, 'wb') as file:
655
+ file.write(response.content)
656
 
657
  # VAE任务10
658
  VAE_download_task10 = False
 
664
  if VAE_download_task10:
665
  response = requests.get(VAE_url10)
666
  with open(VAE_target10, 'wb') as file:
667
+ file.write(response.content)
668
 
669
  # VAE任务11
670
  VAE_download_task11 = False
 
676
  if VAE_download_task11:
677
  response = requests.get(VAE_url11)
678
  with open(VAE_target11, 'wb') as file:
679
+ file.write(response.content)
680
 
681
  # VAE任务12
682
  VAE_download_task12 = False
 
688
  if VAE_download_task12:
689
  response = requests.get(VAE_url12)
690
  with open(VAE_target12, 'wb') as file:
691
+ file.write(response.content)
692
 
693
  # VAE任务13
694
  VAE_download_task13 = False
 
700
  if VAE_download_task13:
701
  response = requests.get(VAE_url13)
702
  with open(VAE_target13, 'wb') as file:
703
+ file.write(response.content)
704
 
705
 
706
 
 
710
  os.makedirs(destination_folder, exist_ok=True)
711
  response = requests.get(url)
712
  with open(os.path.join(destination_folder, filename), 'wb') as file:
713
+ file.write(response.content)
714
 
715
  # _下载任务1_
716
  embeddings_download_task1 = True #@param {type:"boolean"}