Spaces:
Sleeping
Sleeping
Commit ·
f265906
1
Parent(s): bd43355
fix: use window.location.origin for transcribe endpoint
Browse files
app.py
CHANGED
|
@@ -8,7 +8,9 @@ from pathlib import Path
|
|
| 8 |
|
| 9 |
app = FastAPI()
|
| 10 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
|
| 13 |
@app.get("/", response_class=HTMLResponse)
|
| 14 |
async def root():
|
|
|
|
| 8 |
|
| 9 |
app = FastAPI()
|
| 10 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 11 |
+
|
| 12 |
+
os.makedirs("/tmp/whisper", exist_ok=True)
|
| 13 |
+
model = whisper.load_model("base", download_root="/tmp/whisper")
|
| 14 |
|
| 15 |
@app.get("/", response_class=HTMLResponse)
|
| 16 |
async def root():
|