Hunzla commited on
Commit
0920132
1 Parent(s): 14222b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ from transformers import pipeline
2
  from langchain.vectorstores import FAISS
3
  from langchain.embeddings import HuggingFaceEmbeddings
4
 
5
- pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v2")
6
  import json
7
  with open("tasks.json", "r",encoding="utf-8") as json_file:
8
  global data
@@ -24,7 +24,7 @@ for x,item in data.items():
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
29
  print(similar)
30
  reply = find_index(similar)
 
2
  from langchain.vectorstores import FAISS
3
  from langchain.embeddings import HuggingFaceEmbeddings
4
 
5
+ pipe = pipeline("automatic-speech-recognition", model="openai/whisper-small")
6
  import json
7
  with open("tasks.json", "r",encoding="utf-8") as json_file:
8
  global data
 
24
 
25
 
26
  def transcribe_the_command(audio_path,state):
27
+ transcript = pipe(audio_path[1])["text"]
28
  similar = globals()[f"faiss_{state}"].similarity_search(transcript)[0].page_content
29
  print(similar)
30
  reply = find_index(similar)