Spaces:
Sleeping
Sleeping
from fastapi import FastAPI | |
from datasets import load_dataset | |
from transformers import AutoTokenizer | |
app = FastAPI() | |
def greet_json(): | |
# Example: Loading a dataset as part of the API | |
dataset = load_dataset("squad") | |
return {"Hello": "World!", "dataset_length": len(dataset["train"])} | |