Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,14 @@ import os
|
|
| 6 |
import io
|
| 7 |
|
| 8 |
app = FastAPI()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
def process_video(input_bytes, speed=1.5):
|
| 11 |
"""
|
|
|
|
| 6 |
import io
|
| 7 |
|
| 8 |
app = FastAPI()
|
| 9 |
+
from fastapi.middleware.cors import CORSMiddleware
|
| 10 |
+
app.add_middleware(
|
| 11 |
+
CORSMiddleware,
|
| 12 |
+
allow_origins=["*"], # or specific origin(s)
|
| 13 |
+
allow_credentials=True,
|
| 14 |
+
allow_methods=["*"],
|
| 15 |
+
allow_headers=["*"],
|
| 16 |
+
)
|
| 17 |
|
| 18 |
def process_video(input_bytes, speed=1.5):
|
| 19 |
"""
|