Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,12 +8,17 @@ app = FastAPI()
|
|
| 8 |
|
| 9 |
# Access the secret environment variable
|
| 10 |
private_space_token = os.environ.get('api_key')
|
| 11 |
-
api_url = "https://givingtuesday-annotated-990-data.hf.space
|
| 12 |
headers = {
|
| 13 |
"Authorization": f"Bearer {private_space_token}",
|
| 14 |
"Content-Type": "application/json"
|
| 15 |
}
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
@app.get("/eins/")
|
| 18 |
async def proxy_request(request: Request):
|
| 19 |
# Capture all query parameters from the incoming request
|
|
|
|
| 8 |
|
| 9 |
# Access the secret environment variable
|
| 10 |
private_space_token = os.environ.get('api_key')
|
| 11 |
+
api_url = "https://givingtuesday-annotated-990-data.hf.space"
|
| 12 |
headers = {
|
| 13 |
"Authorization": f"Bearer {private_space_token}",
|
| 14 |
"Content-Type": "application/json"
|
| 15 |
}
|
| 16 |
|
| 17 |
+
# /docs is auto-generated
|
| 18 |
+
@app.get('/')
|
| 19 |
+
async def root():
|
| 20 |
+
return {"message": "990 API v1.0 running -- visit https://givingtuesday-annotated-990.hf.space/docs for usage"}
|
| 21 |
+
|
| 22 |
@app.get("/eins/")
|
| 23 |
async def proxy_request(request: Request):
|
| 24 |
# Capture all query parameters from the incoming request
|