NegativeSector's picture
Update app.py
1334a88
raw history blame
No virus
373 Bytes
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()