David Li commited on
Commit
c20e63c
1 Parent(s): 2b1403b

fix: sdk issue

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,13 +1,12 @@
1
  import gradio as gr
2
  import re
3
- from openbb_terminal.sdk import openbb
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
- openbb.forecast.whisper(video=url, output_dir=video_id)
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]