mirrorsai1 / app.py
Wootang01's picture
Capitalize the I in gr.Interface
15527da
raw history blame
No virus
423 Bytes
import gradio as gr
api = gr.Interface.load("huggigngface/EleutherAI/gpt-neo-2.7B")
def complete_with_gpt(text):
return text [:-50] + api(text[-50:])
with gr.Blocks() as demo:
with gr.Row():
textbox = gr.Textbox(placeholder="Type here and press enter...", lines=8)
with gr.Column():
btn = gr.Button("Generate")
btn.click(complete_with_gpt, textbox, textbox)
demo.launch()