File size: 241 Bytes
3ad0303 9fe98d1 3ad0303 00ef6c7 3ad0303 00ef6c7 da509c0 3ad0303 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
from model import GPT2PPLV2 as GPT2PPL
# initialize the model
model = GPT2PPL()
def greet(sentence):
return model(sentence, 512, "v1.1")
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch() |