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

v2 #4

Merged
merged 5 commits into from
Feb 1, 2024
Merged

v2 #4

merged 5 commits into from
Feb 1, 2024

Conversation

yonishelach
Copy link
Collaborator

No description provided.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@yonishelach yonishelach marked this pull request as draft January 21, 2024 14:51
@yonishelach yonishelach marked this pull request as ready for review January 28, 2024 18:51
Copy link
Member

@guy1992l guy1992l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for translate.py. Regarding the doc strings, let's leave it for now, once you mvoe to work with the hub, I'll sort it out

raise EnvironmentError(
f"One or more of the OpenAI required environment variables ('{key}', '{base}') are missing."
f"Please set them as environment variables or install mlrun (`pip install mlrun`)"
f"and set them as project secrets using `projecy.set_secrets`."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f"and set them as project secrets using `projecy.set_secrets`."
f"and set them as project secrets using `project.set_secrets`."

def _set_openai_secrets() -> bool:
key = "OPENAI_API_KEY"
base = "OPENAI_API_BASE"
# Check if the key is already in the environment variables:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Check if the key is already in the environment variables:
# Check if the key is already in the environment variables:

# Check if the key is already in the environment variables:
if key in os.environ and base in os.environ:
return True
# Check if mlrun is installed:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Check if mlrun is installed:
# Check if mlrun is installed:

audio = resampler(audio)
# Save to audio file:
audio_file = output_directory / f"{text_file.stem}.{file_format}"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

else:
audio_pieces["all"] += [audio, gap_between_speakers]
# Construct a single audio array from all the pieces and channels:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

- The generated audio files dataframe.
- The errors dictionary.
"""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


global _LOGGER
_LOGGER = _get_logger()
# Get the input text files to turn to audio:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Get the input text files to turn to audio:
# Get the input text files to turn to audio:

format=file_format,
bits_per_sample=bits_per_sample,
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines +23 to +38
def pipeline(
amount: int,
generation_model: str,
use_small_models: bool,
language: str,
available_voices: List[str],
min_time: int,
max_time: int,
from_date: str,
to_date: str,
from_time: str,
to_time: str,
num_clients: int,
num_agents: int,
generate_clients_and_agents: bool = True,
):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where all the doc strings went? I'm sure I wrote them, weird 😕

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see them anywhere... maybe you wrote them locally?

Comment on lines +99 to +109
def pipeline(
batch: str,
calls_audio_files: str,
transcribe_model: str,
translate_to_english: bool,
pii_recognition_model: str,
pii_recognition_entities: List[str],
pii_recognition_entity_operator_map: List[str],
question_answering_model: str,
batch_size: int = 2,
):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc strings?

@guy1992l guy1992l merged commit 45cde37 into mlrun:main Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants