jaanya commited on
Commit ·
1fefe41
1
Parent(s): 3ee9447
Serve globe page as homepage
Browse files
main.py
CHANGED
|
@@ -6,6 +6,8 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
| 6 |
from routers import incidents, news, analyze, chat
|
| 7 |
import os
|
| 8 |
import requests as req
|
|
|
|
|
|
|
| 9 |
|
| 10 |
def download_mitre():
|
| 11 |
path = "data/mitre_attack.json"
|
|
@@ -38,9 +40,10 @@ app.include_router(news.router, prefix="/api")
|
|
| 38 |
app.include_router(analyze.router, prefix="/api")
|
| 39 |
app.include_router(chat.router, prefix="/api")
|
| 40 |
|
|
|
|
| 41 |
@app.get("/")
|
| 42 |
-
def
|
| 43 |
-
return
|
| 44 |
|
| 45 |
if __name__ == "__main__":
|
| 46 |
port = int(os.environ.get("PORT", 7860))
|
|
|
|
| 6 |
from routers import incidents, news, analyze, chat
|
| 7 |
import os
|
| 8 |
import requests as req
|
| 9 |
+
from fastapi.responses import FileResponse
|
| 10 |
+
|
| 11 |
|
| 12 |
def download_mitre():
|
| 13 |
path = "data/mitre_attack.json"
|
|
|
|
| 40 |
app.include_router(analyze.router, prefix="/api")
|
| 41 |
app.include_router(chat.router, prefix="/api")
|
| 42 |
|
| 43 |
+
|
| 44 |
@app.get("/")
|
| 45 |
+
async def home():
|
| 46 |
+
return FileResponse("static/globe.html")
|
| 47 |
|
| 48 |
if __name__ == "__main__":
|
| 49 |
port = int(os.environ.get("PORT", 7860))
|