Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ generator = pipeline("text-generation", model="gpt2")
|
|
5 |
|
6 |
def generate_prompt(topic):
|
7 |
prompt = f"Write a creative story about {topic}. Here is a prompt to get you started:"
|
8 |
-
result = generator(prompt, max_length=
|
9 |
return result[0]['generated_text']
|
10 |
|
11 |
iface = gr.Interface(
|
|
|
5 |
|
6 |
def generate_prompt(topic):
|
7 |
prompt = f"Write a creative story about {topic}. Here is a prompt to get you started:"
|
8 |
+
result = generator(prompt, max_length=100, num_return_sequences=1)
|
9 |
return result[0]['generated_text']
|
10 |
|
11 |
iface = gr.Interface(
|