Spaces:
Sleeping
Sleeping
Add Heroku deployment configuration
Browse files- .slugignore +28 -0
- Procfile +2 -0
- app.json +41 -0
- app.py +4 -2
- runtime.txt +2 -0
.slugignore
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Ignore files that shouldn't be in the Heroku slug
|
| 2 |
+
.git
|
| 3 |
+
.gitignore
|
| 4 |
+
.env
|
| 5 |
+
.env.local
|
| 6 |
+
*.md
|
| 7 |
+
README.md
|
| 8 |
+
Endpoints.md
|
| 9 |
+
__pycache__/
|
| 10 |
+
*.pyc
|
| 11 |
+
*.pyo
|
| 12 |
+
*.pyd
|
| 13 |
+
.Python
|
| 14 |
+
venv/
|
| 15 |
+
env/
|
| 16 |
+
ENV/
|
| 17 |
+
.vscode/
|
| 18 |
+
.idea/
|
| 19 |
+
*.swp
|
| 20 |
+
*.swo
|
| 21 |
+
.DS_Store
|
| 22 |
+
Thumbs.db
|
| 23 |
+
*.log
|
| 24 |
+
nltk-stubs/
|
| 25 |
+
.cache/
|
| 26 |
+
memory.json
|
| 27 |
+
emotions.json
|
| 28 |
+
|
Procfile
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
web: python app.py
|
| 2 |
+
|
app.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "Digital Galatea AI",
|
| 3 |
+
"description": "A conversational AI with a dynamic emotional model",
|
| 4 |
+
"repository": "https://github.com/codejedi-ai/Digital-Galatea",
|
| 5 |
+
"logo": "https://raw.githubusercontent.com/codejedi-ai/Digital-Galatea/main/static/css/style.css",
|
| 6 |
+
"keywords": ["python", "flask", "ai", "chatbot", "emotional-ai"],
|
| 7 |
+
"env": {
|
| 8 |
+
"DEEPSEEK_API_KEY": {
|
| 9 |
+
"description": "Your DeepSeek API key",
|
| 10 |
+
"required": true
|
| 11 |
+
},
|
| 12 |
+
"INFLECTION_AI_API_KEY": {
|
| 13 |
+
"description": "Your Inflection AI API key",
|
| 14 |
+
"required": true
|
| 15 |
+
},
|
| 16 |
+
"AZURE_TEXT_ANALYTICS_KEY": {
|
| 17 |
+
"description": "Your Azure Text Analytics key (optional)",
|
| 18 |
+
"required": false
|
| 19 |
+
},
|
| 20 |
+
"AZURE_TEXT_ANALYTICS_ENDPOINT": {
|
| 21 |
+
"description": "Your Azure Text Analytics endpoint (optional)",
|
| 22 |
+
"required": false
|
| 23 |
+
},
|
| 24 |
+
"ANU_QUANTUM_API_KEY": {
|
| 25 |
+
"description": "Your ANU Quantum API key (optional)",
|
| 26 |
+
"required": false
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"formation": {
|
| 30 |
+
"web": {
|
| 31 |
+
"quantity": 1,
|
| 32 |
+
"size": "standard-1x"
|
| 33 |
+
}
|
| 34 |
+
},
|
| 35 |
+
"buildpacks": [
|
| 36 |
+
{
|
| 37 |
+
"url": "heroku/python"
|
| 38 |
+
}
|
| 39 |
+
]
|
| 40 |
+
}
|
| 41 |
+
|
app.py
CHANGED
|
@@ -1062,5 +1062,7 @@ if __name__ == '__main__':
|
|
| 1062 |
print(f"\nFlask server starting on port {port}...")
|
| 1063 |
print("Frontend will poll /api/is_initialized for status\n")
|
| 1064 |
|
| 1065 |
-
# Bind to 0.0.0.0 for external access (required for Hugging Face Spaces)
|
| 1066 |
-
|
|
|
|
|
|
|
|
|
| 1062 |
print(f"\nFlask server starting on port {port}...")
|
| 1063 |
print("Frontend will poll /api/is_initialized for status\n")
|
| 1064 |
|
| 1065 |
+
# Bind to 0.0.0.0 for external access (required for Heroku/Hugging Face Spaces)
|
| 1066 |
+
# Disable debug mode in production (Heroku sets DYNO environment variable)
|
| 1067 |
+
debug_mode = os.environ.get('DYNO') is None # Only debug when not on Heroku
|
| 1068 |
+
app.run(host='0.0.0.0', port=port, debug=debug_mode)
|
runtime.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
python-3.10.15
|
| 2 |
+
|