Spaces:
Runtime error
Runtime error
Download app.py from filipeclduarte/minimalFlaskAPI: direct link, hf CLI and curl.
- Browser
- Download file 367 Bytes
-
https://huggingface.co/spaces/filipeclduarte/minimalFlaskAPI/resolve/910539097a40ffdb0b373bb4acdfd687f0027ca3/app.py
- Command line
-
hf download hf://spaces/filipeclduarte/minimalFlaskAPI@910539097a40ffdb0b373bb4acdfd687f0027ca3/app.py
-
curl -L -o app.py https://huggingface.co/spaces/filipeclduarte/minimalFlaskAPI/resolve/910539097a40ffdb0b373bb4acdfd687f0027ca3/app.py
367 Bytes
| from flask import Flask, request | |
| from inference import predict | |
| app = Flask(__name__) | |
| def index(): | |
| return {"output": "Hello, world!"} | |
| def predictSentiment(): | |
| args = request.args | |
| return args["text"] | |
| #return predict(args.get("text")) | |
| if __name__ == "__main__": | |
| app.run(host="0.0.0.0", port=7860) | |