Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,9 +22,7 @@ for x,item in data.items():
|
|
22 |
texts.append(each)
|
23 |
globals()[f"faiss_{x}"] = FAISS.from_texts(texts,HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2",model_kwargs={'device':'cpu'}))
|
24 |
|
25 |
-
|
26 |
-
app = FastAPI()
|
27 |
-
@app.get("/")
|
28 |
def transcribe_the_command(audio_path,state):
|
29 |
transcript = pipe(audio_path)["text"]
|
30 |
similar = globals()[f"faiss_{state}"].similarity_search(transcript)[0].page_content
|
|
|
22 |
texts.append(each)
|
23 |
globals()[f"faiss_{x}"] = FAISS.from_texts(texts,HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2",model_kwargs={'device':'cpu'}))
|
24 |
|
25 |
+
|
|
|
|
|
26 |
def transcribe_the_command(audio_path,state):
|
27 |
transcript = pipe(audio_path)["text"]
|
28 |
similar = globals()[f"faiss_{state}"].similarity_search(transcript)[0].page_content
|