Spaces:
Runtime error
Runtime error
import gradio as gr | |
api = gr.Interface.load("huggingface/EleutherAI/gpt-neo-1.3B") | |
def ai_text(text): | |
return text [:-50] + api(text[-50:]) | |
with gr.Blocks as demo(): | |
textbox = gr.Textbox(placeholder="Input text", lines=5) | |
btn = gr.Button("Submit") | |
btn.click(ai_text, textbox, textbox) | |
demo.launch() |