Skip to content

Commit

Permalink
fix: Update to the version number before the next release.
Browse files Browse the repository at this point in the history
Change-Id: I06df651e7b51719e2c72d713a4fd291c1eac8dfa
  • Loading branch information
Kacper Krasowiak committed Jul 22, 2024
1 parent f39bca3 commit a139a6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ariel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.

"""Ariel library for for end-to-end video ad dubbing using AI."""
__version__ = "0.0.1"
__version__ = "0.0.2"
16 changes: 12 additions & 4 deletions ariel/dubbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,10 +809,14 @@ def _update_utterance_metadata(
*,
updated_utterance: Mapping[str, str | float],
utterance_metadata: Sequence[Mapping[str, str | float]],
edit_index: int | None = None
) -> Sequence[Mapping[str, str | float]]:
"""Runs the update process of the added utterance."""
utterance_metadata_copy = utterance_metadata.copy()
utterance_metadata_copy.append(updated_utterance)
if edit_index:
utterance_metadata_copy[edit_index] = updated_utterance
else:
utterance_metadata_copy.append(updated_utterance)
utterance_metadata_copy.sort(key=lambda item: (item["start"], item["end"]))
added_index = utterance_metadata_copy.index(updated_utterance) + 1
print(f"Item added / modified at position {added_index}.")
Expand Down Expand Up @@ -982,14 +986,18 @@ def _run_verify_utterance_metadata(self) -> None:
edited_utterance = self._run_translation_on_single_utterance(
edited_utterance
)
utterance_metadata[edit_index] = edited_utterance
utterance_metadata = self._update_utterance_metadata(
updated_utterance=edited_utterance,
utterance_metadata=utterance_metadata,
edit_index=edit_index,
)
elif action_choice == "add":
added_utterance = self._add_utterance_metadata()
updated_utterance = self._repopulate_metadata(
added_utterance = self._repopulate_metadata(
utterance=added_utterance, modified=False
)
utterance_metadata = self._update_utterance_metadata(
updated_utterance=updated_utterance,
updated_utterance=added_utterance,
utterance_metadata=utterance_metadata,
)
elif action_choice == "remove":
Expand Down

0 comments on commit a139a6a

Please sign in to comment.