Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

prepare-wikitext-103.sh 827 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  1. #!/bin/bash
  2. # Adapted from https://github.com/facebookresearch/MIXER/blob/master/prepareData.sh
  3. URLS=(
  4. "https://s3.amazonaws.com/research.metamind.io/wikitext/wikitext-103-v1.zip"
  5. )
  6. FILES=(
  7. "wikitext-103-v1.zip"
  8. )
  9. for ((i=0;i<${#URLS[@]};++i)); do
  10. file=${FILES[i]}
  11. if [ -f $file ]; then
  12. echo "$file already exists, skipping download"
  13. else
  14. url=${URLS[i]}
  15. wget "$url"
  16. if [ -f $file ]; then
  17. echo "$url successfully downloaded."
  18. else
  19. echo "$url not successfully downloaded."
  20. exit -1
  21. fi
  22. if [ ${file: -4} == ".tgz" ]; then
  23. tar zxvf $file
  24. elif [ ${file: -4} == ".tar" ]; then
  25. tar xvf $file
  26. elif [ ${file: -4} == ".zip" ]; then
  27. unzip $file
  28. fi
  29. fi
  30. done
  31. cd ..
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...