Spaces:
Running
Running
Update app.py
Browse files
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-
|
90 |
-
result = client.predict(
|
|
|
|
|
|
|
|
|
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,
|