Spaces:
Runtime error
Runtime error
Experimenting with gr.inputs.Textbox for outputs
Browse files
app.py
CHANGED
@@ -4,5 +4,12 @@ def generate_story(story):
|
|
4 |
story_gen = pipeline("text-generation", "pranavpsv/gpt2-genre-story-generator")
|
5 |
generated_story = story_gen("<BOS> <superhero> Batman")
|
6 |
return generated_story
|
7 |
-
interface = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
interface.launch()
|
|
|
4 |
story_gen = pipeline("text-generation", "pranavpsv/gpt2-genre-story-generator")
|
5 |
generated_story = story_gen("<BOS> <superhero> Batman")
|
6 |
return generated_story
|
7 |
+
interface = gr.Interface(
|
8 |
+
fn=generate_story,
|
9 |
+
title="Story Generation with GPT-2",
|
10 |
+
inputs=[gr.Textbox(lines=7, label="Story")],
|
11 |
+
description="Story generation with GPT-2",
|
12 |
+
examples=[["Adventurer is approached by a mysterious stranger in the tavern for a new quest"]],
|
13 |
+
outputs=[gr.inputs.Textbox(label='News Summary Output')]
|
14 |
+
)
|
15 |
interface.launch()
|