rhoitjadhav commited on
Commit
858bd61
·
1 Parent(s): 7e809b7

update dockerfile

Browse files
Files changed (1) hide show
  1. load_data.py +5 -2
load_data.py CHANGED
@@ -7,6 +7,8 @@ def load_data():
7
  import argilla as rg
8
  from datasets import load_dataset
9
 
 
 
10
  # load dataset from the hub
11
  dataset = load_dataset("argilla/gutenberg_spacy-ner", split="train")
12
 
@@ -20,13 +22,14 @@ def load_data():
20
  if __name__ == '__main__':
21
  while True:
22
  try:
23
- response = requests.get("http://0.0.0.0:6900/")
24
  if response.status_code == 200:
25
  load_data()
26
  print("Data Loaded!")
27
  break
28
  else:
29
  time.sleep(5)
 
30
  except Exception as e:
31
  print(e)
32
- pass
 
7
  import argilla as rg
8
  from datasets import load_dataset
9
 
10
+ rg.init(api_key="admin.apikey")
11
+
12
  # load dataset from the hub
13
  dataset = load_dataset("argilla/gutenberg_spacy-ner", split="train")
14
 
 
22
  if __name__ == '__main__':
23
  while True:
24
  try:
25
+ response = requests.get("http://localhost:6900/")
26
  if response.status_code == 200:
27
  load_data()
28
  print("Data Loaded!")
29
  break
30
  else:
31
  time.sleep(5)
32
+
33
  except Exception as e:
34
  print(e)
35
+ time.sleep(10)