Spaces:
Sleeping
Sleeping
Lcmind commited on
Commit ·
30536e5
1
Parent(s): add5b06
test: add simple test app to verify HF Spaces setup
Browse files- Dockerfile +2 -2
- test_app.py +13 -0
Dockerfile
CHANGED
|
@@ -64,5 +64,5 @@ ENV HOME=/home/user \
|
|
| 64 |
# Expose port
|
| 65 |
EXPOSE 7860
|
| 66 |
|
| 67 |
-
# Run
|
| 68 |
-
CMD ["uvicorn", "
|
|
|
|
| 64 |
# Expose port
|
| 65 |
EXPOSE 7860
|
| 66 |
|
| 67 |
+
# Run simple test app first to verify HF Spaces setup
|
| 68 |
+
CMD ["uvicorn", "test_app:app", "--host", "0.0.0.0", "--port", "7860"]
|
test_app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Simple test app to verify HF Spaces setup."""
|
| 2 |
+
|
| 3 |
+
from fastapi import FastAPI
|
| 4 |
+
|
| 5 |
+
app = FastAPI()
|
| 6 |
+
|
| 7 |
+
@app.get("/")
|
| 8 |
+
def root():
|
| 9 |
+
return {"status": "working", "message": "Test app is running!"}
|
| 10 |
+
|
| 11 |
+
@app.get("/health")
|
| 12 |
+
def health():
|
| 13 |
+
return {"status": "healthy"}
|