Spaces:
Sleeping
Sleeping
File size: 429 Bytes
ad647f4 cc4b2a1 ad647f4 cc4b2a1 ad647f4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from fastapi import FastAPI
from huggingface_hub import HfApi
app = FastAPI()
@app.get("/")
def greet_json():
with open("test.txt", "w") as f:
f.write("HELLO WORLD")
api = HfApi()
api.upload_file(
path_or_fileobj="test.txt",
path_in_repo="test.txt",
repo_id="jonathanjordan21/test-dataset",
repo_type="dataset",
)
return {"Hello": "World!"}
|