Spaces:
Sleeping
Sleeping
| from fastapi import FastAPI | |
| from huggingface_hub import HfApi | |
| app = FastAPI() | |
| 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!"} | |