Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,9 +35,8 @@ if uploaded_file:
|
|
| 35 |
|
| 36 |
# Step 2: Generate Story (remove prompt from output)
|
| 37 |
with st.spinner("Writing a children's story..."):
|
| 38 |
-
prompt = f"{caption}"
|
| 39 |
story_output = gpt2(
|
| 40 |
-
prompt,
|
| 41 |
max_length=100,
|
| 42 |
num_return_sequences=1,
|
| 43 |
do_sample=True,
|
|
|
|
| 35 |
|
| 36 |
# Step 2: Generate Story (remove prompt from output)
|
| 37 |
with st.spinner("Writing a children's story..."):
|
| 38 |
+
prompt = f"Write a short, imaginative story for children aged 3-10 about this: {caption}"
|
| 39 |
story_output = gpt2(
|
|
|
|
| 40 |
max_length=100,
|
| 41 |
num_return_sequences=1,
|
| 42 |
do_sample=True,
|