media-generator

所属分类:其他
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2024-02-23 18:49:24
上 传 者sh-1993
说明:  介质发生器
(media generator)

文件列表:
assets/
templates/
.example.env
media_generator.py
requirements.txt

# Battlecabbage Media Generator This respository is host to a media generation tool that is part of a larger Battlecabbage Media project. This tools makes use of multiple Azure OpenAI models. - Azure Open AI - GPT4 - GPT-4 Turbo for Vision capabilities - Dalle3 The result is complete movie with title, tagline, description, content rating, critic review and more. In addition a poster is created to match the movie allowing for what is effectively an automatic movie maker. All of this data is largely utilized for [Battlecabbage Media](#) ## Media Generation ![Media Generation Flow](assets/images/media_generation_flow.jpeg) ### Step-By-Step: 1) [Media Generator](library-management/generators/media_generator.py) heavily utilitizes the [prompts.json](library-management/templates/prompts.json) containing handwritten prompts for various Azure OpenAI model endpoints and their uses. The prompts are written to be dynamic and are filled in at random from the category json files (e.g. [genres.json](library-management/templates/genres.json)). Its like a movie maker madlib! 2) The stitched together prompt is sent to a generative Text model to build a new movie including info like its title, tagline and description (and much more) as a new movie completion. 3) Using the 'movie' completion, we send various details to a generative text model to ask it to create a prompt that would be used in a generative image model (Dalle in our case). We also give it a list of fonts and say pick one you think is best. 4) The image prompt is sent to a generative image model to create a poster to be used for the movie. 5) The generated image is sent to the GPT Vision model to suggest what location on the poster text should go and what color the font should be. 6) The title is placed on the image in the color and location suggested by the Vision model, saved as a jpeg and the details of the movie are saved as a JSON file. **Voila!** We just used Azure OpenAI generative models to make a movie from a general description of what the movie should entail and after passing the completions through various models it spits out a full film right down to the poster to go with it. Check out the [poster](assets/examples/images/generated_poster_1.jpg) and [movie](assets/examples/json/generated_movie_1.json) assets to see some exmples of results.

近期下载者

相关文件


收藏者