Spaces:
Runtime error
Runtime error
import gradio as gr | |
import json | |
from transformers import AutoTokenizer, AutoModelWithLMHead | |
tokenizer = AutoTokenizer.from_pretrained("gpt2") | |
model = AutoModelWithLMHead.from_pretrained("gpt2") | |
def green(prompt): | |
print(tokenizer("help")) | |
iface = gr.Interface(fn=green, inputs=gr.inputs.Textbox(lines=2, placeholder="Put prompt here"), outputs="text") | |
iface.launch() |