Skip to content

Commit

Permalink
Fix language selection bug
Browse files Browse the repository at this point in the history
  • Loading branch information
aalramadan committed Jul 11, 2024
1 parent d845794 commit 2fab522
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self):
self.combo_model.currentIndexChanged.connect(lambda: ui_functions.reset_temp_slider(self))
self.combo_model_whisper.currentIndexChanged.connect(lambda: ui_functions.switch_whisper_models(self))


self.target_language.currentIndexChanged.connect(lambda: ui_functions.generate_prompt(self))
self.box_genre.currentIndexChanged.connect(lambda: ui_functions.generate_prompt(self))
self.box_demo.currentIndexChanged.connect(lambda: ui_functions.generate_prompt(self))
self.box_localization.currentIndexChanged.connect(lambda: ui_functions.generate_prompt(self))
Expand Down
4 changes: 2 additions & 2 deletions ui_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from pandas import read_excel, read_csv, DataFrame
from json import loads, dumps
from google.generativeai import GenerativeModel, configure, types
from os import environ, remove
from os import environ, remove, path
from uuid import uuid4
from torch import cuda

Expand Down Expand Up @@ -211,7 +211,7 @@ async def load_template_file(main_window):
# Extract audio. whether from a video or an audio, is stored as .wav
def extract_text_from_video(main_window, selected_file, api_key_whisper):
unique_id = str(uuid4())
filename = f"{unique_id}.mp3"
filename = path.join(path.dirname(selected_file), f"{unique_id}.mp3")

duration = main_window.duration.text()
if duration == "Max" or duration == "max":
Expand Down

0 comments on commit 2fab522

Please sign in to comment.