Spaces:
Runtime error
Runtime error
from fastapi import FastAPI | |
import uvicorn | |
from sentence_transformers import SentenceTransformer | |
model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2') | |
app = FastAPI() | |
async def transcribe(text: str): | |
embeddings = model.encode([text], vad_filter=True) | |
return embeddings[0] | |
if __name__ == '__main__': | |
uvicorn.run('app:app', host='0.0.0.0', port=7860) |