We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6d00ac commit 78ba937Copy full SHA for 78ba937
app.py
@@ -14,7 +14,14 @@ def translator():
14
"is_english": is_english,
15
"translated_content": translated_content,
16
})
17
-
+@app.route("/translate", methods=["POST"])
18
+def hardcoded_translate():
19
+ data = request.get_json()
20
+ text = data.get("text", "") if data else ""
21
+ # For P4A, we return a dummy translation response
22
+ return jsonify({
23
+ "translatedText": "Hello world"
24
+ }), 200
25
26
if __name__ == "__main__":
27
app.run(debug=True, host="0.0.0.0", port=int(os.environ.get("PORT", 8080)))
0 commit comments