Skip to content

Commit

Permalink
Merge pull request #3 from ElenaRyumina/main
Browse files Browse the repository at this point in the history
Summary
  • Loading branch information
DmitryRyumin authored Dec 8, 2023
2 parents 2ae9bcf + a81bab8 commit 4534001
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions oceanai/modules/lab/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
warnings.filterwarnings("ignore", category=FutureWarning, module="tensorflow")

import tensorflow as tf # Машинное обучение от Google

import keras

from oceanai.modules.lab.utils.attention import Attention # Модуль внимания
Expand Down Expand Up @@ -817,10 +818,10 @@ def __process_audio_and_extract_features(
input_features = inputs.input_features.to(self._device)
if lang == self.__lang_traslate[0]:
generated_ids = self._model_transcriptions.generate(
inputs=input_features, forced_decoder_ids=self.__forced_decoder_ids
inputs=input_features, forced_decoder_ids=self.__forced_decoder_ids, max_new_tokens=448
)
elif lang == self.__lang_traslate[1]:
generated_ids = self._model_transcriptions.generate(inputs=input_features)
generated_ids = self._model_transcriptions.generate(inputs=input_features, max_new_tokens=448)
transcription = self._processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
self.__text_pred += transcription

Expand Down Expand Up @@ -960,7 +961,7 @@ def _get_text_features(
if out:
self.show_notebook_history_output() # Отображение истории вывода сообщений в ячейке Jupyter

win = 448000
win = 400000

try:
self.__text_pred = ""
Expand Down Expand Up @@ -1791,7 +1792,7 @@ def get_text_union_predictions(
code_error_pred_nn = 2

if code_error_pred_hc != -1 and code_error_pred_nn != -1:
self._error(self._models_text_not_formation, out=out)
self._error(self._model_text_not_formation, out=out)
return False

if code_error_pred_hc != -1:
Expand Down
2 changes: 1 addition & 1 deletion oceanai/modules/lab/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def __post_init__(self):
# ----------------------- Только для внутреннего использования внутри класса

# Поддерживаемые видео форматы
self.__supported_video_formats: List[str] = ["mp4"]
self.__supported_video_formats: List[str] = ["mp4", "mov"]

self.__mp_face_mesh: ModuleType = mp.solutions.face_mesh # 468 3D-ориентиров лица
self.__mp_drawing: ModuleType = mp.solutions.drawing_utils # Утилиты MediaPipe
Expand Down

0 comments on commit 4534001

Please sign in to comment.