Witold Wydmański commited on
Commit
e39ab47
·
1 Parent(s): d17ef4a
Files changed (1) hide show
  1. metagenomic_curated.py +5 -1
metagenomic_curated.py CHANGED
@@ -38,7 +38,11 @@ Pasolli E, Schiffer L, Manghi P, Renson A, Obenchain V, Truong D, Beghini F, Mal
38
  def get_metadata():
39
  ehids = []
40
  descriptions = []
41
- with open("index.tsv", "r") as f:
 
 
 
 
42
  for line in f:
43
  ehid, desc = line.split("\t")
44
  ehids.append(ehid)
 
38
  def get_metadata():
39
  ehids = []
40
  descriptions = []
41
+ with tempfile.NamedTemporaryFile(delete=False) as tmpfname:
42
+ r = requests.get("https://huggingface.co/datasets/wwydmanski/metagenomic_curated/raw/main/index.tsv", allow_redirects=True)
43
+ open(tmpfname.name, 'wb').write(r.content)
44
+
45
+ with open(tmpfname.name, "r") as f:
46
  for line in f:
47
  ehid, desc = line.split("\t")
48
  ehids.append(ehid)