Zfintech89
commited on
Commit
·
0102aae
1
Parent(s):
d92a26b
initial commit
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ from typing import Dict, List, Set
|
|
| 9 |
import base64
|
| 10 |
import mimetypes
|
| 11 |
import os
|
| 12 |
-
|
| 13 |
app = FastAPI(title="Tri-Chat API", description="Real-time chat with WebSocket support")
|
| 14 |
|
| 15 |
# Setup templates
|
|
@@ -224,6 +224,8 @@ async def get_room_users(room: str):
|
|
| 224 |
"user_count": len(users)
|
| 225 |
}
|
| 226 |
|
|
|
|
|
|
|
| 227 |
if __name__ == "__main__":
|
| 228 |
-
|
| 229 |
-
uvicorn.run(app, host="0.0.0.0", port=
|
|
|
|
| 9 |
import base64
|
| 10 |
import mimetypes
|
| 11 |
import os
|
| 12 |
+
import uvicorn
|
| 13 |
app = FastAPI(title="Tri-Chat API", description="Real-time chat with WebSocket support")
|
| 14 |
|
| 15 |
# Setup templates
|
|
|
|
| 224 |
"user_count": len(users)
|
| 225 |
}
|
| 226 |
|
| 227 |
+
|
| 228 |
+
|
| 229 |
if __name__ == "__main__":
|
| 230 |
+
port = int(os.getenv("PORT", 7860)) # Hugging Face expects 7860
|
| 231 |
+
uvicorn.run(app, host="0.0.0.0", port=port)
|