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() |
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() |