Commit
·
00fc4dc
1
Parent(s):
9f94037
put the vid inside the fastapi app silly
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ except Exception:
|
|
| 49 |
from magenta_rt import system, audio as au
|
| 50 |
import numpy as np
|
| 51 |
from fastapi import FastAPI, UploadFile, File, Form, Body, HTTPException, Response, Request, WebSocket, WebSocketDisconnect, Query
|
| 52 |
-
from fastapi.responses import JSONResponse
|
| 53 |
import tempfile, io, base64, math, threading
|
| 54 |
from fastapi.middleware.cors import CORSMiddleware
|
| 55 |
from contextlib import contextmanager
|
|
@@ -1601,4 +1601,8 @@ def read_root():
|
|
| 1601 |
<p>Documentation file not found. Please check documentation.html</p>
|
| 1602 |
</body></html>
|
| 1603 |
"""
|
| 1604 |
-
return Response(content=html_content, media_type="text/html")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
from magenta_rt import system, audio as au
|
| 50 |
import numpy as np
|
| 51 |
from fastapi import FastAPI, UploadFile, File, Form, Body, HTTPException, Response, Request, WebSocket, WebSocketDisconnect, Query
|
| 52 |
+
from fastapi.responses import JSONResponse, FileResponse
|
| 53 |
import tempfile, io, base64, math, threading
|
| 54 |
from fastapi.middleware.cors import CORSMiddleware
|
| 55 |
from contextlib import contextmanager
|
|
|
|
| 1601 |
<p>Documentation file not found. Please check documentation.html</p>
|
| 1602 |
</body></html>
|
| 1603 |
"""
|
| 1604 |
+
return Response(content=html_content, media_type="text/html")
|
| 1605 |
+
|
| 1606 |
+
@app.get("/lil_demo_540p.mp4")
|
| 1607 |
+
def demo_video():
|
| 1608 |
+
return FileResponse(Path(__file__).parent / "lil_demo_540p.mp4", media_type="video/mp4")
|