GithubHelp home page GithubHelp logo

360macky / generative-manim Goto Github PK

View Code? Open in Web Editor NEW
252.0 5.0 46.0 1.05 MB

🎨 GPT for video generation ⚡️

Home Page: https://generative-manim.vercel.app

License: Apache License 2.0

Dockerfile 1.07% Python 58.68% Jupyter Notebook 40.25%
2d animation gpt gpt-4 gpt3 gpt3-turbo manim openai python-3 rendering

generative-manim's Issues

The App Starts Rendering with Partial Code

Your app is good and to some extent, brilliant.
However, it seems Streamlit starts rendering having only received partial code, and not the complete code for an animation.
This obviously, cause the animation not to render.
Here try this for example:
swing a double pendulum

Generation of scenes mixing via API in high traffic

In some cases, the scenes returned by the API can be mixed when there are multiple requests.

Example:

image

Code:

class GraphArrow(Scene):
    def construct(self):
        # Create axes and labels
        axes = Axes(x_range=[0, 10], y_range=[0, 10])
        x_label = MathTex(r'\text{Espaço}').scale(0.575)
        y_label = MathTex(r'\text{Tempo}').scale(0.75)
        labels = VGroup(x_label.next_to(axes.x_axis, RIGHT), y_label.next_to(axes.y_axis, UP))

        # Create dots
        d = Dot(color=WHITE, radius=0.1)
        d.move_to([0, 0, 0])
        d2 = Dot(color=WHITE, radius=0.1)
        d2.move_to([-1, 0, 0])

        # Group dots
        g = VGroup(d, d2)
        g.arrange()

        # Create traced paths
        trace = VMobject()
        trace2 = VMobject()

        trace_points = []
        trace2_points = []

        def update_trace(trace):
            trace_points.append(d.get_center())
            if len(trace_points) > 1:
                new_path = DashedVMobject(Line(trace_points[-2], trace_points[-1]), num_dashes=1, equal_lengths=True)
                trace.add(new_path)

        def update_trace2(trace2):
            trace2_points.append(d2.get_center())
            if len(trace2_points) > 1:
                new_path = DashedVMobject(Line(trace2_points[-2], trace2_points[-1]), num_dashes=1, equal_lengths=True)
                trace2.add(new_path)

        trace.add_updater(update_trace)
        trace2.add_updater(update_trace2)

        # Add elements to the scene
        self.play(Write(axes), Write(labels))
        self.add(d, d2, trace, trace2)
        self.wait(2)
        self.play(d.animate.move_to([0, 3, 0]), d2.animate.move_to([0, 2, 0]))
        self.wait(2)
        self.play(d.animate.move_to([0, -3, 0]), d2.animate.move_to([0, -2, 0]))
        self.wait(2)
        trace.clear_updaters()
        trace2.clear_updaters()

Video:

video-GenScene-GenScene-338.1.mp4

Roadmap: Generative Manim Suite

Engines

An engine is a complete text-to-code and code-to-video generation system for Generative Manim (GM). Since there are many ways we can think about video generation, we developed multiple engines so that they can be evaluated with LangSmith.

  • GM powered by DSL
  • GM powered by LangGraph
  • GM OpenAI Fine-tuned
  • GM OpenAI GPT-4 with Few-Shot Learning
  • GM OpenAI GPT-4 with Zero-Shot Learning
  • GM OpenAI GPT-4 with Ontologies/RAG

Anyone can suggest a new way (workflow, method, technique) to generate videos.

Platforms

API

Generative Manim will be available with a REST API.

  • Create /code-to-video endpoint (Ready)
  • Create /text-to-code endpoint (To be enhanced)
    • Add an option to switch between different GM engines (e.g. DSL, Ontologies, etc.)
    • Add first model (the simplest one, using GPT-4 with few-shot training and zero shot learning)

LangChain Integration

  • Create a package over LangChain?

GPT / Chatbot

  • OpenAPI YAML file with API endpoints

Streamlit

  • New OpenAI API Key
  • Integrate new system to detect possible errors on Streamlit

Testing

  • Define how to test the results of GM engines, in order to choose the best. From the best engine that makes the best result, to the best engine with the lowest usage of tokens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.