GuillaumeSalouHF HF staff commited on
Commit
f87394b
1 Parent(s): 2eb2337

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -13,17 +13,15 @@ from fastapi_utils.tasks import repeat_every
13
 
14
  from datasets import load_dataset, Image
15
 
16
-
17
  def get_datasetdata(dataset_path):
18
 
19
 
20
-
21
  def sync_discussion_to_dataset():
22
  dataset = load_dataset("beans", split="train")
23
  dataset[0]["image"]
24
 
25
- app = FastAPI()
26
 
 
27
 
28
  @app.post("/")
29
  def read_root():
@@ -39,5 +37,5 @@ def sync():
39
  @app.on_event("startup")
40
  @repeat_every(seconds=1800)
41
  def repeat_sync():
42
- sync_to_dataset()
43
  return "Synced data to huggingface datasets"
 
13
 
14
  from datasets import load_dataset, Image
15
 
 
16
  def get_datasetdata(dataset_path):
17
 
18
 
 
19
  def sync_discussion_to_dataset():
20
  dataset = load_dataset("beans", split="train")
21
  dataset[0]["image"]
22
 
 
23
 
24
+ app = FastAPI()
25
 
26
  @app.post("/")
27
  def read_root():
 
37
  @app.on_event("startup")
38
  @repeat_every(seconds=1800)
39
  def repeat_sync():
40
+ sync_discussion_to_dataset()
41
  return "Synced data to huggingface datasets"