vikit.gateways.fake_ML_models_gateway

Overview

Classes

FakeMLModelsGateway

This class is a gateway to a remote API hosting Machine Learning models as a service.

Classes

class vikit.gateways.fake_ML_models_gateway.FakeMLModelsGateway

Bases: vikit.gateways.ML_models_gateway.MLModelsGateway

This class is a gateway to a remote API hosting Machine Learning models as a service. It abstracts the main features needed to interact with the API

Stubs inheriting from this class may be created for each model to be used so as to prevent dependencies on the actual API implementation and speed up tests

Overview

Methods

ask_gemini(prompt, more_contents)

-

cleanse_llm_keywords(input)

-

compose_music_from_text_async(prompt_text, duration, sleep_time)

-

extract_audio_slice(i, end, audiofile_path, target_file_name)

-

extract_audio_slice_async(i, end, audiofile_path, target_file_name, sleep_time)

-

generate_background_music_async(duration, prompt, sleep_time)

-

generate_mp3_from_text_async(prompt_text, target_file)

-

generate_seine_transition_async(source_image_path, target_image_path, sleep_time)

-

generate_video_async(prompt, model_provider, aspect_ratio, sleep_time)

-

get_enhanced_prompt_async(subtitleText, excluded_words, sleep_time)

-

get_keywords_from_prompt(subtitleText, excluded_words, sleep_time)

-

get_keywords_from_prompt_async(subtitleText, excluded_words, sleep_time)

-

get_music_generation_keywords_async(text, sleep_time)

-

get_subtitles(audiofile_path, sleep_time)

-

get_subtitles_async(audiofile_path, sleep_time)

-

interpolate_async(link_to_video, sleep_time)

-

sleep(sleep_time)

-

Members

async ask_gemini(prompt, more_contents=None)
cleanse_llm_keywords(input)
async compose_music_from_text_async(prompt_text: str, duration: int, sleep_time: int = 0)
extract_audio_slice(i, end, audiofile_path, target_file_name: str = None)
async extract_audio_slice_async(i, end, audiofile_path, target_file_name: str = None, sleep_time: int = 0)
async generate_background_music_async(duration: float = 3, prompt: str = None, sleep_time: int = 0) str
async generate_mp3_from_text_async(prompt_text, target_file: str = None)
async generate_seine_transition_async(source_image_path, target_image_path, sleep_time: int = 0)
async generate_video_async(prompt, model_provider: str, aspect_ratio=(16, 9), sleep_time: int = 0)
async get_enhanced_prompt_async(subtitleText, excluded_words: str = None, sleep_time: int = 0)
async get_keywords_from_prompt(subtitleText, excluded_words: str = None, sleep_time: int = 0)
async get_keywords_from_prompt_async(subtitleText, excluded_words: str = None, sleep_time: int = 0)
async get_music_generation_keywords_async(text, sleep_time: int = 0) str
async get_subtitles(audiofile_path, sleep_time: int = 0)
async get_subtitles_async(audiofile_path, sleep_time: int = 0)
async interpolate_async(link_to_video: str, sleep_time: int = 0)
sleep(sleep_time=1)

Attributes

vikit.gateways.fake_ML_models_gateway.STUDENT_ARM_WRITING = 'student_arm_writting.mp4'
vikit.gateways.fake_ML_models_gateway.TESTS_MEDIA_FOLDER = 'tests/medias/'