Spaces:
Sleeping
Sleeping
from fastapi import FastAPI, Request | |
from huggingface_hub._oauth import attach_huggingface_oauth, parse_huggingface_oauth | |
app = FastAPI() | |
def greet_json(): | |
return {"Hello": "World!"} | |
def greet_json(request: Request): | |
oauth = parse_huggingface_oauth(request) | |
print(oauth) | |
return {"Hello": print(oauth)} | |
attach_huggingface_oauth(app) |