Spaces:
Sleeping
Sleeping
File size: 875 Bytes
bd93d2d 7cb6dab 4f0879f 7cb6dab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
---
title: Noding
emoji: 🦀
colorFrom: blue
colorTo: yellow
sdk: gradio
sdk_version: 5.27.0
app_file: app.py
pinned: false
---
**1. Receive as a Python Dictionary (JSON Object)**
Useful if you want to immediately work with the data in Python.
```python
import requests; data = requests.post("http://localhost:7860/api/process", json={"code": "def hello(): pass", "format": "json"}, headers={"Authorization": "Bearer hf_YOUR_TOKEN"}).json()
```
**2. Receive as a JSONL String**
Useful if you are appending directly to a file or stream.
```python
import requests; jsonl_string = requests.post("http://localhost:7860/api/process", json={"code": "def hello(): pass", "format": "jsonl"}, headers={"Authorization": "Bearer hf_YOUR_TOKEN"}).text
requests.post("https://broadfield-dev-noding.hf.space/api/process", json={"code": "def hello(): pass", "format": "jsonl"}).text
``` |