Skip to content

Instantly share code, notes, and snippets.

View ToluClassics's full-sized avatar
🏠
Working from home

Ogundepo Odunayo ToluClassics

🏠
Working from home
View GitHub Profile
@ToluClassics
ToluClassics / lib.rs
Created May 30, 2023 00:36 — forked from JosephCatrambone/lib.rs
Embedding GPT-2 in Godot via Rust
mod ml_thread;
use gdnative::prelude::{godot_print, methods, Method, NativeClass, Node as GDNode, InitHandle, godot_init};
use ml_thread::start_language_model_thread;
use std::sync::mpsc::{channel, Receiver, RecvError, Sender, SendError};
const MAX_INPUT_LENGTH: usize = 512;
const BATCH_SIZE: usize = 1;