Spaces:
Sleeping
Sleeping
Download test_server.py from Kamarov/ts_explorer: direct link, hf CLI and curl.
- Browser
- Download file 402 Bytes
-
https://huggingface.co/spaces/Kamarov/ts_explorer/resolve/main/test_server.py
- Command line
-
hf download hf://spaces/Kamarov/ts_explorer/test_server.py
-
curl -L -o test_server.py https://huggingface.co/spaces/Kamarov/ts_explorer/resolve/main/test_server.py
402 Bytes
| import time | |
| from flask import Flask, request, jsonify | |
| app = Flask(__name__) | |
| def process_text(): | |
| data = request.get_json() | |
| input_text = data.get("text", "") | |
| time.sleep(1) | |
| processed_text = f"{input_text[::-1]}" | |
| return jsonify({"processed_text": processed_text}) | |
| if __name__ == "__main__": | |
| app.run(host="127.0.0.1", port=5000) | |