Spaces:
Runtime error
Runtime error
David Li
commited on
Commit
•
c20e63c
1
Parent(s):
2b1403b
fix: sdk issue
Browse files
app.py
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
import re
|
3 |
-
from openbb_terminal.
|
4 |
|
5 |
def get_video_id(url):
|
6 |
video_id = re.findall(r"v=([-\w]{11})", url)[0]
|
7 |
# make folder to store output files
|
8 |
-
os.makedirs(video_id, exist_ok=True)
|
9 |
# extract video ID from URL using regular expression
|
10 |
-
|
11 |
# return files from video_id folder
|
12 |
# find file with video_id/*_summary.txt
|
13 |
summary_file = glob.glob(f"{video_id}/*_summary.txt")[0]
|
|
|
1 |
import gradio as gr
|
2 |
import re
|
3 |
+
from openbb_terminal.forecast.whisper_model import transcribe_and_summarize
|
4 |
|
5 |
def get_video_id(url):
|
6 |
video_id = re.findall(r"v=([-\w]{11})", url)[0]
|
7 |
# make folder to store output files
|
|
|
8 |
# extract video ID from URL using regular expression
|
9 |
+
transcribe_and_summarize(video=url, output_dir=video_id)
|
10 |
# return files from video_id folder
|
11 |
# find file with video_id/*_summary.txt
|
12 |
summary_file = glob.glob(f"{video_id}/*_summary.txt")[0]
|