Spaces:
Build error
Build error
Download app2.py from Munwar92/Customized_Chatbot: direct link, hf CLI and curl.
- Browser
- Download file 482 Bytes
-
https://huggingface.co/spaces/Munwar92/Customized_Chatbot/resolve/main/app2.py
- Command line
-
hf download hf://spaces/Munwar92/Customized_Chatbot/app2.py
-
curl -L -o app2.py https://huggingface.co/spaces/Munwar92/Customized_Chatbot/resolve/main/app2.py
482 Bytes
| from flask import Flask, request, jsonify | |
| app = Flask(__name__) | |
| def home(): | |
| return "Hello from Flask API on Hugging Face Spaces!" | |
| def predict(): | |
| data = request.json | |
| # Replace this with your custom logic | |
| response = { | |
| "message": "Your input was processed successfully!", | |
| "input_data": data | |
| } | |
| return jsonify(response) | |
| if __name__ == '__main__': | |
| app.run(host='0.0.0.0', port=7860) | |