Illia56 commited on
Commit
73a22dd
1 Parent(s): 03e52ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -86,8 +86,12 @@ def transcribe_video(youtube_url: str, path: str) -> List[Document]:
86
  Transcribe a video and return its content as a Document.
87
  """
88
  logging.info(f"Transcribing video: {youtube_url}")
89
- client = Client("https://sanchit-gandhi-whisper-jax.hf.space/")
90
- result = client.predict(youtube_url, "translate", True, fn_index=7)
 
 
 
 
91
  return [Document(page_content=result[1], metadata=dict(page=1))]
92
 
93
  # def predict(message: str, system_prompt: str = '', temperature: float = 0.7, max_new_tokens: int = 1024,
 
86
  Transcribe a video and return its content as a Document.
87
  """
88
  logging.info(f"Transcribing video: {youtube_url}")
89
+ client = Client("https://sanchit-gandhi-whisper-large-v2.hf.space/")
90
+ result = client.predict(
91
+ youtube_url,
92
+ "transcribe",
93
+ api_name="/predict_2"
94
+ )
95
  return [Document(page_content=result[1], metadata=dict(page=1))]
96
 
97
  # def predict(message: str, system_prompt: str = '', temperature: float = 0.7, max_new_tokens: int = 1024,