Spaces:
Runtime error
Runtime error
File size: 787 Bytes
10c1724 fc193de 10c1724 9f779c5 46426e7 10c1724 2eb2337 46426e7 705d5f2 10c1724 f87394b 10c1724 6b9f5fa 10c1724 f87394b 10c1724 |
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 34 35 36 37 38 39 40 |
import os
import re
import json
from pathlib import Path
from huggingface_hub import Repository, HfFolder
import tqdm
import subprocess
from fastapi import FastAPI
from fastapi_utils.tasks import repeat_every
from datasets import load_dataset, Image
def get_datasetdata(dataset_path):
print("todo")
def sync_discussion_to_dataset():
print("todo")
#dataset = load_dataset("beans", split="train")
#dataset[0]["image"]
app = FastAPI()
@app.post("/")
def read_root():
return "Just a bot to push data to huggingface datasets "
@app.post("/sync")
def sync():
return "Synced data to huggingface datasets"
@app.on_event("startup")
@repeat_every(seconds=1800)
def repeat_sync():
sync_discussion_to_dataset()
return "Synced data to huggingface datasets"
|