Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Automatic Video Analysis with NLP 📺 #4323

Merged
merged 65 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
eed3c3d
i18n
martinb-ai Jan 16, 2023
737cb89
large commit
martinb-ai Jan 16, 2023
6792f8e
fixes with vids
martinb-ai Jan 16, 2023
6a30094
working
martinb-ai Jan 18, 2023
f7f1ef2
more features
martinb-ai Jan 18, 2023
0d377ce
working summarizer
martinb-ai Jan 18, 2023
74cf852
working with urls
martinb-ai Jan 20, 2023
1a96579
many upgrades
martinb-ai Jan 20, 2023
2b848f8
git ignore cache
martinb-ai Feb 21, 2023
57c30f4
fb model
martinb-ai Feb 21, 2023
94b5002
fix chucks
martinb-ai Feb 21, 2023
42690f2
tqdm
martinb-ai Feb 21, 2023
1e67353
trailmap
martinb-ai Feb 23, 2023
b06419b
poetry
martinb-ai Feb 23, 2023
b716a5c
sentiment analysis
martinb-ai Feb 24, 2023
c628aac
refactor
martinb-ai Feb 24, 2023
b211fca
changing to base model default
martinb-ai Feb 24, 2023
effe1b3
rounding
martinb-ai Feb 24, 2023
ca7f251
Merge branch 'develop' into feature/whisper
martinb-ai Feb 24, 2023
1a3e899
renewing poetry
martinb-ai Feb 24, 2023
0a56643
fixed poetry
martinb-ai Feb 24, 2023
7f5b4f9
spacing
martinb-ai Feb 24, 2023
962c397
black
martinb-ai Feb 24, 2023
f0712ae
linting v2
martinb-ai Feb 24, 2023
87d1309
silly imports
martinb-ai Feb 24, 2023
b053bfa
adding tempfile
martinb-ai Feb 24, 2023
7393c85
reordering imports
martinb-ai Feb 24, 2023
14e7532
Merge branch 'develop' into feature/whisper
martinb-ai Feb 24, 2023
80d1eb7
Merge branch 'develop' into feature/whisper
martinb-ai Feb 24, 2023
fee073c
Merge branch 'develop' into feature/whisper
jmaslek Feb 24, 2023
e02e6ff
update spec
jmaslek Feb 24, 2023
062d318
add hidden import
jmaslek Feb 24, 2023
7485cdc
add hidden imports
jmaslek Feb 24, 2023
fd61422
imports again
jmaslek Feb 24, 2023
65c0383
valid url check
martinb-ai Feb 24, 2023
5463761
new lines and prompt
martinb-ai Feb 24, 2023
7a0151a
split imports
martinb-ai Feb 24, 2023
95bf5e9
more spec
jmaslek Feb 24, 2023
dbff054
hook test for pyinstaller
tehcoderer Feb 27, 2023
081defc
Update hook-whisper.py
tehcoderer Feb 27, 2023
695f4e3
oops lol
tehcoderer Feb 27, 2023
8f68393
catch for error message
martinb-ai Feb 27, 2023
345c6e7
fix for frozendict
andrewkenreich Feb 27, 2023
60857ef
caching search and prompting on hub
martinb-ai Feb 27, 2023
b395fbc
whisper model prompts
martinb-ai Feb 27, 2023
af09546
sdk updates
martinb-ai Feb 28, 2023
3d9bc4c
Merge branch 'develop' into feature/whisper
tehcoderer Feb 28, 2023
857fdc9
update dep files
tehcoderer Feb 28, 2023
4f210a0
Update trail_map_forecasting.csv
tehcoderer Feb 28, 2023
c308fcc
import ordering pylint?
martinb-ai Feb 28, 2023
546687d
fix trailing comma
tehcoderer Feb 28, 2023
f894187
Merge branch 'feature/whisper' of https://github.com/OpenBB-finance/O…
tehcoderer Feb 28, 2023
9655b88
sorted trailmaps
tehcoderer Feb 28, 2023
c76484e
update deps
tehcoderer Feb 28, 2023
115ea8e
req files
tehcoderer Feb 28, 2023
1a1c32a
ruff
jmaslek Feb 28, 2023
0131988
mypy
jmaslek Feb 28, 2023
c53723c
ruff v2..
martinb-ai Feb 28, 2023
8c7a84e
ruff v3
martinb-ai Feb 28, 2023
3ca3405
util linting changes
martinb-ai Feb 28, 2023
afb4883
linting for controller
martinb-ai Feb 28, 2023
f39e297
Merge branch 'develop' into feature/whisper
martinb-ai Feb 28, 2023
f384fe2
test
jmaslek Feb 28, 2023
427cab0
see if this sticks
jmaslek Feb 28, 2023
f1a993a
Fix linters. Add --video if not provided
jmaslek Feb 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,9 @@ darts_logs/
custom_imports/*.csv
custom_imports/*/*.csv

# cache
cache/

# lightning logs
lightning_logs/

35 changes: 35 additions & 0 deletions build/pyinstaller/hooks/hook-whisper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import importlib

import importlib_metadata
from PyInstaller.utils.hooks import copy_metadata

datas = copy_metadata("transformers")
datas += copy_metadata("tokenizers")
datas += copy_metadata("tqdm")
datas += copy_metadata("regex")
datas += copy_metadata("requests")
datas += copy_metadata("packaging")
datas += copy_metadata("filelock")
datas += copy_metadata("numpy")
datas += copy_metadata("torch")

candidates = [
"tensorflow",
"tensorflow-cpu",
"tensorflow-gpu",
"tf-nightly",
"tf-nightly-cpu",
"tf-nightly-gpu",
"intel-tensorflow",
"intel-tensorflow-avx512",
"tensorflow-rocm",
"tensorflow-macos",
"tensorflow-aarch64",
]
for candidate in candidates:
try:
if importlib.util.find_spec(candidate):
datas += copy_metadata(candidate)
break
except importlib_metadata.PackageNotFoundError:
pass
18 changes: 15 additions & 3 deletions build/pyinstaller/terminal.spec
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ added_files = [
(os.path.join(pathex, "user_agent"), "user_agent"),
(os.path.join(pathex, "vaderSentiment"), "vaderSentiment"),
(os.path.join(pathex, "prophet"), "prophet"),
(os.path.join(pathex, "whisper"), "whisper"),
(os.path.join(pathex, "transformers"), "transformers"),
(
os.path.join(pathex, "linearmodels", "datasets"),
os.path.join("linearmodels", "datasets"),
Expand All @@ -77,10 +79,14 @@ added_files = [
(os.path.join(pathex, "blib2to3", "PatternGrammar.txt"), "blib2to3"),
]
if is_win:
added_files.append(
(os.path.join(f"{os.path.dirname(scipy.__file__)}.libs"), "scipy.libs/"),
added_files.extend(
[
(os.path.join(f"{os.path.dirname(scipy.__file__)}.libs"), "scipy.libs/"),
(os.path.join(pathex, "frozendict", "version.py"), "frozendict"),
]
)


# Python libraries that are explicitly pulled into the bundle
hidden_imports = [
"sklearn.utils._cython_blas",
Expand All @@ -98,15 +104,21 @@ hidden_imports = [
"statsmodels",
"user_agent",
"vaderSentiment",
"pyEX",
"feedparser",
"_sysconfigdata__darwin_darwin",
"prophet",
"debugpy",
"scipy.sparse.linalg._isolve._iterative",
"whisper",
"transformers",
"yt_dlp",
"textwrap3",
]


if is_win:
hidden_imports.append("frozendict")

analysis_kwargs = dict(
scripts=[os.path.join(os.getcwd(), "terminal.py")],
pathex=[pathex, "."],
Expand Down
1 change: 1 addition & 0 deletions openbb_terminal/core/config/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ def get_user_data_directory():
USER_REPORTS_DIRECTORY = USER_DATA_DIRECTORY / "reports"
USER_CUSTOM_REPORTS_DIRECTORY = USER_DATA_DIRECTORY / "reports" / "custom reports"
USER_FORECAST_MODELS_DIRECTORY = USER_DATA_DIRECTORY / "exports" / "forecast_models"
USER_FORECAST_WHISPER_DIRECTORY = USER_DATA_DIRECTORY / "exports" / "whisper"
1 change: 1 addition & 0 deletions openbb_terminal/core/sdk/models/forecast_sdk_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,4 @@ def __init__(self):
self.theta_chart = lib.forecast_theta_view.display_theta_forecast
self.trans = lib.forecast_trans_model.get_trans_data
self.trans_chart = lib.forecast_trans_view.display_trans_forecast
self.whisper = lib.forecast_whisper_model.transcribe_and_summarize
1 change: 1 addition & 0 deletions openbb_terminal/core/sdk/sdk_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@
theta_view as forecast_theta_view,
trans_model as forecast_trans_model,
trans_view as forecast_trans_view,
whisper_model as forecast_whisper_model,
)
except ImportError:
FORECASTING_TOOLKIT_ENABLED = False
Expand Down
78 changes: 39 additions & 39 deletions openbb_terminal/core/sdk/trail_map_forecasting.csv
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
trail,model,view
forecast.anom,forecast_anom_model.get_anomaly_detection_data,forecast_anom_view.display_anomaly_detection
forecast.atr,forecast_model.add_atr,
forecast.autoarima,forecast_autoarima_model.get_autoarima_data,forecast_autoarima_view.display_autoarima_forecast
forecast.autoces,forecast_autoces_model.get_autoces_data,forecast_autoces_view.display_autoces_forecast
forecast.autoets,forecast_autoets_model.get_autoets_data,forecast_autoets_view.display_autoets_forecast
forecast.autoselect,forecast_autoselect_model.get_autoselect_data,forecast_autoselect_view.display_autoselect_forecast
forecast.brnn,forecast_brnn_model.get_brnn_data,forecast_brnn_view.display_brnn_forecast
forecast.clean,forecast_model.clean,
forecast.combine,forecast_model.combine_dfs,
forecast.corr,forecast_model.corr_df,forecast_view.display_corr
forecast.delete,forecast_model.delete_column,
forecast.delta,forecast_model.add_delta,
forecast.desc,forecast_model.describe_df,forecast_view.describe_df
forecast.ema,forecast_model.add_ema,
forecast.expo,forecast_expo_model.get_expo_data,forecast_expo_view.display_expo_forecast
forecast.export,forecast_view.export_df,
forecast.linregr,forecast_linregr_model.get_linear_regression_data,forecast_linregr_view.display_linear_regression
forecast.load,common_model.load,
forecast.mom,forecast_model.add_momentum,
forecast.mstl,forecast_mstl_model.get_mstl_data,forecast_mstl_view.display_mstl_forecast
forecast.nbeats,forecast_nbeats_model.get_NBEATS_data,forecast_nbeats_view.display_nbeats_forecast
forecast.nhits,forecast_nhits_model.get_nhits_data,forecast_nhits_view.display_nhits_forecast
forecast.plot,forecast_view.display_plot,forecast_view.display_plot
forecast.regr,forecast_regr_model.get_regression_data,forecast_regr_view.display_regression
forecast.rename,forecast_model.rename_column,
forecast.rnn,forecast_rnn_model.get_rnn_data,forecast_rnn_view.display_rnn_forecast
forecast.roc,forecast_model.add_roc,
forecast.rsi,forecast_model.add_rsi,
forecast.rwd,forecast_rwd_model.get_rwd_data,forecast_rwd_view.display_rwd_forecast
forecast.season,,forecast_view.display_seasonality
forecast.seasonalnaive,forecast_seasonalnaive_model.get_seasonalnaive_data,forecast_seasonalnaive_view.display_seasonalnaive_forecast
forecast.show,forecast_view.show_df,
forecast.signal,forecast_model.add_signal,
forecast.sto,forecast_model.add_sto,
forecast.tcn,forecast_tcn_model.get_tcn_data,forecast_tcn_view.display_tcn_forecast
forecast.tft,forecast_tft_model.get_tft_data,forecast_tft_view.display_tft_forecast
forecast.theta,forecast_theta_model.get_theta_data,forecast_theta_view.display_theta_forecast
forecast.trans,forecast_trans_model.get_trans_data,forecast_trans_view.display_trans_forecast
trail,model,view
forecast.anom,forecast_anom_model.get_anomaly_detection_data,forecast_anom_view.display_anomaly_detection
forecast.atr,forecast_model.add_atr,
forecast.autoarima,forecast_autoarima_model.get_autoarima_data,forecast_autoarima_view.display_autoarima_forecast
forecast.autoces,forecast_autoces_model.get_autoces_data,forecast_autoces_view.display_autoces_forecast
forecast.autoets,forecast_autoets_model.get_autoets_data,forecast_autoets_view.display_autoets_forecast
forecast.autoselect,forecast_autoselect_model.get_autoselect_data,forecast_autoselect_view.display_autoselect_forecast
forecast.brnn,forecast_brnn_model.get_brnn_data,forecast_brnn_view.display_brnn_forecast
forecast.clean,forecast_model.clean,
forecast.combine,forecast_model.combine_dfs,
forecast.corr,forecast_model.corr_df,forecast_view.display_corr
forecast.delete,forecast_model.delete_column,
forecast.delta,forecast_model.add_delta,
forecast.desc,forecast_model.describe_df,forecast_view.describe_df
forecast.ema,forecast_model.add_ema,
forecast.expo,forecast_expo_model.get_expo_data,forecast_expo_view.display_expo_forecast
forecast.export,forecast_view.export_df,
forecast.linregr,forecast_linregr_model.get_linear_regression_data,forecast_linregr_view.display_linear_regression
forecast.load,common_model.load,
forecast.mom,forecast_model.add_momentum,
forecast.mstl,forecast_mstl_model.get_mstl_data,forecast_mstl_view.display_mstl_forecast
forecast.nbeats,forecast_nbeats_model.get_NBEATS_data,forecast_nbeats_view.display_nbeats_forecast
forecast.nhits,forecast_nhits_model.get_nhits_data,forecast_nhits_view.display_nhits_forecast
forecast.plot,forecast_view.display_plot,forecast_view.display_plot
forecast.regr,forecast_regr_model.get_regression_data,forecast_regr_view.display_regression
forecast.rename,forecast_model.rename_column,
forecast.rnn,forecast_rnn_model.get_rnn_data,forecast_rnn_view.display_rnn_forecast
forecast.roc,forecast_model.add_roc,
forecast.rsi,forecast_model.add_rsi,
forecast.rwd,forecast_rwd_model.get_rwd_data,forecast_rwd_view.display_rwd_forecast
forecast.season,,forecast_view.display_seasonality
forecast.seasonalnaive,forecast_seasonalnaive_model.get_seasonalnaive_data,forecast_seasonalnaive_view.display_seasonalnaive_forecast
forecast.show,forecast_view.show_df,
forecast.signal,forecast_model.add_signal,
forecast.sto,forecast_model.add_sto,
forecast.tcn,forecast_tcn_model.get_tcn_data,forecast_tcn_view.display_tcn_forecast
forecast.tft,forecast_tft_model.get_tft_data,forecast_tft_view.display_tft_forecast
forecast.theta,forecast_theta_model.get_theta_data,forecast_theta_view.display_theta_forecast
forecast.trans,forecast_trans_model.get_trans_data,forecast_trans_view.display_trans_forecast
Loading