Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ HEADERS = {"Authorization": f"Bearer {HF_TOKEN}"}
|
|
| 18 |
def home():
|
| 19 |
return "CANARD Rewrite API running on HuggingFace Spaces! Use POST to / with {'queries': [...]}"
|
| 20 |
|
| 21 |
-
@app.route("/", methods=["POST"]) # Moved to root for HF routing compatibility
|
| 22 |
def rewrite():
|
| 23 |
data = request.get_json()
|
| 24 |
queries = data.get("queries")
|
|
|
|
| 18 |
def home():
|
| 19 |
return "CANARD Rewrite API running on HuggingFace Spaces! Use POST to / with {'queries': [...]}"
|
| 20 |
|
| 21 |
+
@app.route("/rewrite", methods=["POST"]) # Moved to root for HF routing compatibility
|
| 22 |
def rewrite():
|
| 23 |
data = request.get_json()
|
| 24 |
queries = data.get("queries")
|