import gradio as gr from peft import PeftModel, PeftConfig from transformers import AutoModelForCausalLM # config = PeftConfig.from_pretrained("Electricarchmage/ApocryphaGenerator") # model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neox-20b") # model = PeftModel.from_pretrained(model, "Electricarchmage/ApocryphaGenerator") apocrypha_gen = gr.Interface.load("Electricarchmage/ApocryphaGenerator") description = "Generate Apocrypha (just fyi this thing pulls up all 20 billion parameters in the model as it executes here, so you might be here for a while)" title = "Apocrypha Generator using GPT-NeoX-20b" examples[["Some apocrypha about Noah's Ark: "]] Series(description = description, title = title, inputs = gr.inputs.Textbox(lines = 10)).launch()