Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,12 +3,13 @@ import gradio as gr
|
|
3 |
api=gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
|
4 |
|
5 |
def complete_with_gpt(text):
|
6 |
-
|
7 |
|
8 |
with gr.Blocks()as demo:
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
12 |
btn=gr.Button("Generate")
|
13 |
|
14 |
btn.click(complete_with_gpt,textbox,textbox)
|
|
|
3 |
api=gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
|
4 |
|
5 |
def complete_with_gpt(text):
|
6 |
+
return text[:-50]+api(text[-50:])
|
7 |
|
8 |
with gr.Blocks()as demo:
|
9 |
+
with gr.Row():
|
10 |
+
textbox=gr.Textbox(placeholder="Type here and press enter...",
|
11 |
+
lines=8)
|
12 |
+
with gr.Column():
|
13 |
btn=gr.Button("Generate")
|
14 |
|
15 |
btn.click(complete_with_gpt,textbox,textbox)
|