Spaces:
Runtime error
Runtime error
Download app.py from jonathanbsanders/minimal: direct link, hf CLI and curl.
- Browser
- Download file 363 Bytes
-
https://huggingface.co/spaces/jonathanbsanders/minimal/resolve/main/app.py
- Command line
-
hf download hf://spaces/jonathanbsanders/minimal/app.py
-
curl -L -o app.py https://huggingface.co/spaces/jonathanbsanders/minimal/resolve/main/app.py
363 Bytes
| import requests | |
| API_URL = "https://api-inference.huggingface.co/models/openai-gpt" | |
| headers = {"Authorization": "Bearer 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"} | |
| def query(payload): | |
| response = requests.post(API_URL, headers=headers, json=payload) | |
| return response.json() | |
| output = query({ | |
| "inputs": "Can you please let us know more details about your ", | |
| }) |