File size: 767 Bytes
4f7c840
 
 
 
c3067fd
 
 
4f7c840
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()