rcook's picture
Update app.py
df6fdec verified
raw
history blame
424 Bytes
from fastapi import FastAPI
from datasets import load_dataset
from transformers import AutoTokenizer
app = FastAPI()
@app.get("/")
def summarize():
# Example: Loading a dataset as part of the API
billsum = load_dataset("billsum", split="ca_test")
import pandas as pd
df = pd.read_csv("my_dataset.csv")
print(df.head()) # Debugging step
return {"Hello": "World!", "dataset_length": len(billsum)}