Spaces:
Runtime error
Runtime error
NegativeSector
commited on
Commit
•
a3eaf2e
1
Parent(s):
9f469ad
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ generator = pipeline(
|
|
12 |
)
|
13 |
model = AutoModelWithLMHead.from_pretrained("gpt2")
|
14 |
def green(prompt):
|
15 |
-
text_generator(prompt, max_length=500)
|
16 |
|
17 |
-
iface = gr.Interface(fn=green, inputs=gr.inputs.Textbox(lines=2, placeholder="Put prompt here"), outputs="text")
|
18 |
iface.launch()
|
|
|
12 |
)
|
13 |
model = AutoModelWithLMHead.from_pretrained("gpt2")
|
14 |
def green(prompt):
|
15 |
+
return text_generator(prompt, max_length=500)
|
16 |
|
17 |
+
iface = gr.Interface(fn=green, inputs=gr.inputs.Textbox(lines=2, placeholder="Put prompt here"), outputs=gr.outputs.Textbox(type="str", label="generated text"))
|
18 |
iface.launch()
|