-
Notifications
You must be signed in to change notification settings - Fork 27
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
v2 #4
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this 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`." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else: | ||
audio_pieces["all"] += [audio, gap_between_speakers] | ||
# Construct a single audio array from all the pieces and channels: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The generated audio files dataframe. | ||
- The errors dictionary. | ||
""" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
global _LOGGER | ||
_LOGGER = _get_logger() | ||
# Get the input text files to turn to audio: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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, | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, | ||
): |
There was a problem hiding this comment.
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 😕
There was a problem hiding this comment.
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?
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, | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc strings?
No description provided.