Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
api = gr.Interface.load("huggingface/EleutherAI/gpt-neo-1.3B")
|
4 |
|
@@ -6,7 +7,7 @@ def ai_text(text):
|
|
6 |
return text [:-50] + api(text[-50:])
|
7 |
|
8 |
with gr.Blocks() as demo:
|
9 |
-
textbox = gr.Textbox(
|
10 |
btn = gr.Button("Submit")
|
11 |
btn.click(ai_text, textbox, textbox)
|
12 |
|
|
|
1 |
import gradio as gr
|
2 |
+
from gradio.mix import Textbox
|
3 |
|
4 |
api = gr.Interface.load("huggingface/EleutherAI/gpt-neo-1.3B")
|
5 |
|
|
|
7 |
return text [:-50] + api(text[-50:])
|
8 |
|
9 |
with gr.Blocks() as demo:
|
10 |
+
textbox = gr.Textbox(lines=5)
|
11 |
btn = gr.Button("Submit")
|
12 |
btn.click(ai_text, textbox, textbox)
|
13 |
|