国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

使用 GPT-4 和 Midjourney 建構(gòu)Tiktok故事

這篇具有很好參考價(jià)值的文章主要介紹了使用 GPT-4 和 Midjourney 建構(gòu)Tiktok故事。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

您準(zhǔn)備好探索生成AI的奇妙世界,創(chuàng)作出富有吸引力的故事并配以引人入勝的插圖了嗎?根據(jù)我最近使用GPT-4和Midjourney的體驗(yàn),我成功地使用YiVal構(gòu)建了一個(gè)端到端的敘事,GPT-4用來生成大規(guī)模的故事,同時(shí)Midjourney創(chuàng)建令人驚嘆的插圖。

1.定義用例

在本教程中,我們將重點(diǎn)介紹如何構(gòu)建一個(gè)應(yīng)用程序,該應(yīng)用程序?qū)⒂嘘P(guān)動(dòng)物物種和性格的信息作為輸入,并生成引人入勝的故事作為輸出。為了增加額外的沉浸感,讓我們通過使用 Midjourney 創(chuàng)建隨附的圖像來增強(qiáng)生成的故事——Midjourney 是一種將故事轉(zhuǎn)化為精美插圖的出色工具。

2.手動(dòng)工作流程

一種簡單的方法是編寫一個(gè)簡單的提示,例如“作為一名講故事的人,給我講一個(gè)關(guān)于勇敢獅子的動(dòng)物故事”。然而,使用這種方法,LLM(大型語言模型)的輸出通常不能令人滿意。此外,為Midjourney調(diào)整提示的過程非常耗時(shí)。一些博主聲稱他們可以使用GPT-4和Midjourney在幾分鐘內(nèi)生成高質(zhì)量的敘述。相比之下,我花了15分鐘才生成一個(gè)故事,還不包括設(shè)置時(shí)間。調(diào)整提示和在GPT-4和Midjourney之間切換非常耗時(shí)和痛苦。

使用 GPT-4 和 Midjourney 建構(gòu)Tiktok故事,AIGC,oneapi,chatgpt

? ? ? ? ? ? ? ? ? ? ? ? ? ?多輪故事提示調(diào)整 ? ??

使用 GPT-4 和 Midjourney 建構(gòu)Tiktok故事,AIGC,oneapi,chatgpt

? ? ? ? ? ? ? ? ? ? ? ? ? ? 生成的可怕圖片 ??

所以后來,我特意加了一個(gè)故事提示,確保敘事不嚇人,從而開始了新一輪的調(diào)優(yōu)......?

3.YiVal 工作流程

讓我們看看 YiVal 是如何簡化這個(gè)問題的。YiVal github倉庫中有一個(gè)demo。 下面是一個(gè)YiVal的工作流程,根據(jù)動(dòng)物的種類和性格編寫故事,然后中途會(huì)生成這個(gè)故事的相應(yīng)封面。

使用 GPT-4 和 Midjourney 建構(gòu)Tiktok故事,AIGC,oneapi,chatgpt

?opanai_prompt_data_generator會(huì)生成動(dòng)物物種及其性格,如{cat , brave}

變體(variation)是指原始提示的不同版本或改編,同時(shí)仍保持核心目標(biāo) - 生成動(dòng)物故事。在這個(gè)demo中,我們編寫了一個(gè)提示generate-animal-story-template。變體在實(shí)驗(yàn)中至關(guān)重要,它們能夠?yàn)橥蝗蝿?wù)提供動(dòng)態(tài)的視角和方法。

我們用 { species , character } 格式化這個(gè)模板,并通過 GPT-4 生成詳細(xì)的故事,并使用 { drawing_style } 作為 Midjourney 的輸入來可視化這個(gè)故事。生成的故事和動(dòng)物圖像將由人類評(píng)估員進(jìn)行評(píng)估,用戶可以輕松地對(duì)生成的結(jié)果進(jìn)行反饋。

您可以使用或遵循YiVal github倉庫中的demo notebook來運(yùn)行demo。

!poetry run yival run /content/YiVal/demo/configs/animal_story.yml

您將能夠在端口號(hào) 127.0.0.1:8073 中看到結(jié)果。

?數(shù)據(jù)生成

我使用基于 GPT-4 的自動(dòng)數(shù)據(jù)集生成來輔助生成 20 個(gè)隨機(jī)animal_spieces和animal_charator數(shù)據(jù)集。這將幫助我們?cè)u(píng)估提示的性能,并提供用于評(píng)估的數(shù)據(jù)。

dataset:
  data_generators:
    openai_prompt_data_generator:
      chunk_size: 2
      diversify: true
      prompt:
          "Please provide a concrete and realistic test case as a dictionary for function invocation using the ** operator.
          Only include parameters, excluding description and name.
          Ensure it's succinct and well-structured.
          **Only provide the dictionary.**"
      input_function:
        description:
          Given the species of an animal and its character, generate a corresponding story
        name: animal_story_generation
        parameters:
          species: str
          character: str
          drawing_style: str
      number_of_examples: 20
      model_name: gpt-4
      output_path: animal_story.pkl
  source_type: machine_generated

提示創(chuàng)建組合

variations:
  - name: task
    generator_name: openai_prompt_based_variation_generator
    generator_config:
      model_name: gpt-4
      number_of_variations: 3
      diversify: true
      max_tokens: 2000
      variables: null
      prompt:
        - content: |-
            Your object is to construct a concise instruction prompt for GPT-4. This prompt will instruct GPT-4 as a gentle, imaginative children's writer to write all kinds of cute, kid-friendly stories based on animal species and personalities for an audience of YOUNG ADULTS and TEENAGERS.
            Points to emphasize in your instruction:
              -  GPT4 Answers should have a short storyline and should be sufficiently imaginative, answers should focus on the location in which the story takes place with its style of drawing, the location and style of drawing can be contrary to the laws of reality, dream-like or realistic.
              -   The story must be kept lively and as short, short, short, short, short as possible. The story should have a variety of backgrounds + drawing styles and fully emphasize the location where the story takes place; it can be dreamlike and generally bizarre.
              -  Be sure to use words that are as easy to understand as possible so TEENAGERS can easily understand the story.
              -   Please limit the output to within 300 words
            - {animal_species} represent the species of the animal
            - {animal_character} represent the character of the animal
            - At all times, gpt-4 must give a response as an animal story

            Craft your instruction Ensure that GPT-4 is able to fully understand the types and personalities of small animals and write engaging and fully pictorial stories.
            keep your output crisp: only the prompt, devoid of any extraneous content.

          role: system
custom_function: demo.animal_story.image_generation
description: Generated experiment config




evaluators:
  - evaluator_type: individual
    metric_calculators:
      - method: AVERAGE
    name: openai_prompt_based_evaluator
    display_name: story_quality
    prompt: |-
      You are assessing a submitted story based on a given task based on a criterion. Here is the data:
      - Task: Given the species of an animal and corresponding character, generate one story.
      - Does the story demonstrate creativity, coherence, and engaging narrative? A well-written story should captivate the reader and effectively convey a compelling narrative with clear structure and character development.
      [Input]: animal_species : {species}, animal_character: {character}
      [Result]: {raw_output}
      Answer the question by selecting one of the following options:
      A The story is of very low quality and lacks coherence and engagement.
      B The story has some issues with coherence and engagement, but has potential for improvement.
      C The story is of satisfactory quality, but there is room for improvement.
      D The story is well-written and demonstrates good coherence and engagement.
      E The story is exceptionally well-written, demonstrating strong coherence and engagement.
    choices: ["A", "B", "C", "D", "E"]
    # model_name specify the llm model , e.g. a16z-infra/llama-2-13b-chat:9dff94b1bed5af738655d4a7cbcdcde2bd503aa85c94334fe1f42af7f3dd5ee3
    model_name: gpt-4
    description: "evaluate the quality of the generated story"
    scale_description: "0-4"
    choice_scores:
      A: 0
      B: 1
      C: 2
      D: 3
      E: 4

human_rating_configs:
  - name: relevance
    instructions: Rate the relevance of the image to the story.
    scale: [1, 5]

  - name: image_quality
    instructions: Rate the quality of the generated image.
    scale: [1, 5]

4.人工輸入進(jìn)行評(píng)估

YiVal 通過提供強(qiáng)大的評(píng)估器功能來確保生成故事的質(zhì)量和相關(guān)性。YiVal 中的評(píng)估器支持自動(dòng)評(píng)估,包括延遲度和令牌數(shù)量等指標(biāo)。

使用 GPT-4 和 Midjourney 建構(gòu)Tiktok故事,AIGC,oneapi,chatgpt

YiVal 通過提供用戶友好的人工標(biāo)簽 UI 進(jìn)一步增強(qiáng)了評(píng)估過程。開發(fā)人員可以輕松提供人工評(píng)估,添加關(guān)鍵的人工反饋層來完善和微調(diào)生成的故事,使生成的故事能夠與受眾產(chǎn)生共鳴。

單擊“人工評(píng)分(human rating)”列下的鏈接即可跳轉(zhuǎn)到評(píng)分儀表板。例如,我們可以根據(jù)相關(guān)性、圖片質(zhì)量等對(duì)動(dòng)物故事進(jìn)行評(píng)分,并將人類標(biāo)簽保存為評(píng)估。使用 GPT-4 和 Midjourney 建構(gòu)Tiktok故事,AIGC,oneapi,chatgpt?使用 GPT-4 和 Midjourney 建構(gòu)Tiktok故事,AIGC,oneapi,chatgpt

?文章來源地址http://www.zghlxwxcb.cn/news/detail-752785.html

5.結(jié)語

我們已經(jīng)了解了 YiVal 如何加速開發(fā)和評(píng)估過程,現(xiàn)在一起來創(chuàng)建我們的動(dòng)物故事應(yīng)用程序吧!通過使用 YiVal來生成提示、評(píng)估結(jié)果以及結(jié)合人工反饋,我們打造出了引人入勝的故事,并使用 Midjourney將這些故事轉(zhuǎn)化為栩栩如生的插圖,讓故事更加鮮活。??

?

到了這里,關(guān)于使用 GPT-4 和 Midjourney 建構(gòu)Tiktok故事的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • AI繪畫 stable diffusion Midjourney 官方GPT文檔 AIGC百科全書資料收集

    教學(xué)AI繪畫 AIGC工具 SD教程 https://yv4kfv1n3j.feishu.cn/docx/MRyxdaqz8ow5RjxyL1ucrvOYnnH 很多友友反饋,在線二維碼生成器404不能用了,給大家總結(jié)了10個(gè)在線二維碼生成器,方便大家推廣,已同步至群文檔

    2024年02月12日
    瀏覽(56)
  • ChatGPT4.0使用教程,GPT聯(lián)網(wǎng)模型提問,GPTs應(yīng)用,Midjourney-AI繪畫,AI換臉,Suno-AI音樂生成大模型

    ChatGPT4.0使用教程,GPT聯(lián)網(wǎng)模型提問,GPTs應(yīng)用,Midjourney-AI繪畫,AI換臉,Suno-AI音樂生成大模型

    ChatGPT3.5、GPT4.0、相信對(duì)大家應(yīng)該不感到陌生吧?簡單來說,GPT-4技術(shù)比之前的GPT-3.5相對(duì)來說更加智能,會(huì)根據(jù)用戶的要求生成多種內(nèi)容甚至也可以和用戶進(jìn)行創(chuàng)作交流。 然而,GPT-4對(duì)普通用戶來說都是需要額外付費(fèi)才可以使用。所以今天小編就整理一個(gè)真正可免費(fèi)的AI工具,

    2024年04月13日
    瀏覽(33)
  • AIGC,ChatGPT AI繪畫 Midjourney 注冊(cè)流程詳細(xì)步驟

    AIGC,ChatGPT AI繪畫 Midjourney 注冊(cè)流程詳細(xì)步驟

    AI 繪畫,Midjourney完成高清圖片繪制,輕松掌握AI工具。 前期準(zhǔn)備: ①?一個(gè)能使用的谷歌賬號(hào) ②?可以訪問外網(wǎng) Midjourney注冊(cè) 1.進(jìn)入midjourney官網(wǎng)https://www.midjourney.com?點(diǎn)擊左下角”Join the Beta”,就可以注冊(cè),第一次使用的小伙伴會(huì)彈出提示,只需要點(diǎn)擊Accept ToS就會(huì)開始生成啦

    2024年02月03日
    瀏覽(17)
  • AIGC下的CV多模態(tài)原理解析:從CLIP/BLIP到stable diffusion/Midjourney、GPT4

    AIGC下的CV多模態(tài)原理解析:從CLIP/BLIP到stable diffusion/Midjourney、GPT4

    終于開寫本CV多模態(tài)系列的核心主題:stable diffusion相關(guān)的了,為何執(zhí)著于想寫這個(gè)stable diffusion呢,源于三點(diǎn) 去年stable diffusion和midjourney很火的時(shí)候,就想寫,因?yàn)榻?jīng)常被刷屏,但那會(huì)時(shí)間錯(cuò)不開 去年11月底ChatGPT出來后,我今年1月初開始寫ChatGPT背后的技術(shù)原理,而今年2月份

    2024年02月10日
    瀏覽(31)
  • 生成式人工智能(AIGC)綜述:ChatGPT從GPT-4到GPT-5可以一統(tǒng)AIGC?

    生成式人工智能(AIGC)綜述:ChatGPT從GPT-4到GPT-5可以一統(tǒng)AIGC?

    原文題目: 《A Complete Survey on Generative AI (AIGC): Is ChatGPT from GPT-4 to GPT-5 All You Need?》 文章鏈接: https://arxiv.org/abs/2303.11717 https://arxiv.org/abs/2303.11717 引言: 隨著ChatGPT的火熱傳播,生成式AI(AIGC,即AI生成的內(nèi)容)因其分析和創(chuàng)造文本、圖像等能力而在各地引起了轟動(dòng)。在如此強(qiáng)

    2024年02月09日
    瀏覽(28)
  • AIGC、ChatGPT、GPT系列?我的認(rèn)識(shí)

    AIGC(AI generated content),新型內(nèi)容生產(chǎn)方式。AIGC是利用人工智能技術(shù)來生成內(nèi)容,也就是,它可以用輸入數(shù)據(jù)生成相同或不同類型的內(nèi)容,比如輸入文字、生成文字,輸入文字、生成圖像等。 GPT-3是生成型的預(yù)訓(xùn)練變換模型,是一個(gè)自回歸語言模型,神經(jīng)網(wǎng)絡(luò)包括1750億個(gè)參

    2024年02月02日
    瀏覽(19)
  • ChatGPT - 如何高效的調(diào)教ChatGPT (指令建構(gòu)模型-LACES問題模型)

    ChatGPT - 如何高效的調(diào)教ChatGPT (指令建構(gòu)模型-LACES問題模型)

    LACES問題模型是一個(gè)更具體的提問prompts構(gòu)建方法。它包括以下五個(gè)要素: 為問題或指令增加 限定條件 ,有助于獲得更具針對(duì)性的答案。 舉例: 在兩分鐘內(nèi),如何向一個(gè)初學(xué)者介紹人工智能? 寫一段優(yōu)美的散文介紹春日花開的美好景象,200字以上 請(qǐng)?jiān)?100 字內(nèi)解釋 CRISPR 基

    2023年04月25日
    瀏覽(54)
  • 國內(nèi)免費(fèi)ChatGPT+AI繪畫創(chuàng)作網(wǎng)站工具+支持GPT-4+Midjourney繪畫

    國內(nèi)免費(fèi)ChatGPT+AI繪畫創(chuàng)作網(wǎng)站工具+支持GPT-4+Midjourney繪畫

    GPT4.0 相信對(duì)大家應(yīng)該不感到陌生吧?簡單來說,GPT-4技術(shù)比之前的GPT-3.5相對(duì)來說更加智能,會(huì)根據(jù)用戶的要求生成多種內(nèi)容甚至也可以和用戶進(jìn)行創(chuàng)作交流。 然而,GPT-4對(duì)普通用戶來說都是需要額外付費(fèi)才可以使用。所以今天小編就整理一個(gè)真正免費(fèi)的公益GPT4網(wǎng)站。不是只

    2024年02月05日
    瀏覽(24)
  • 智能AI問答系統(tǒng)ChatGPT網(wǎng)站系統(tǒng)源碼+Midjourney繪畫+支持GPT-4-Turbo模型+支持GPT-4圖片理解能力

    智能AI問答系統(tǒng)ChatGPT網(wǎng)站系統(tǒng)源碼+Midjourney繪畫+支持GPT-4-Turbo模型+支持GPT-4圖片理解能力

    SparkAi創(chuàng)作系統(tǒng)是基于ChatGPT進(jìn)行開發(fā)的Ai智能問答系統(tǒng)和Midjourney繪畫系統(tǒng),支持OpenAI-GPT全模型+國內(nèi)AI全模型。本期針對(duì)源碼系統(tǒng)整體測(cè)試下來非常完美,可以說SparkAi是目前國內(nèi)一款的ChatGPT對(duì)接OpenAI軟件系統(tǒng)。那么如何搭建部署AI創(chuàng)作ChatGPT?小編這里寫一個(gè)詳細(xì)圖文教程吧!

    2024年02月04日
    瀏覽(28)
  • 最新ChatGPT商業(yè)運(yùn)營系統(tǒng)源碼+支持GPT4/支持ai繪畫+支持Midjourney繪畫

    最新ChatGPT商業(yè)運(yùn)營系統(tǒng)源碼+支持GPT4/支持ai繪畫+支持Midjourney繪畫

    SparkAi創(chuàng)作系統(tǒng)是基于OpenAI很火的ChatGPT進(jìn)行開發(fā)的Ai智能問答系統(tǒng)和Midjourney繪畫系統(tǒng),支持OpenAI-GPT全模型+國內(nèi)AI全模型。本期針對(duì)源碼系統(tǒng)整體測(cè)試下來非常完美,可以說SparkAi是目前國內(nèi)一款的ChatGPT對(duì)接OpenAI軟件系統(tǒng)。那么如何搭建部署AI創(chuàng)作ChatGPT?小編這里寫一個(gè)詳細(xì)圖

    2024年02月03日
    瀏覽(94)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包