Update app.py
Browse files
app.py
CHANGED
|
@@ -32,13 +32,14 @@ def generate_content(image):
|
|
| 32 |
# Create prompt for story
|
| 33 |
prompt = (
|
| 34 |
f"Write a funny, warm children's story for ages 3-10, 50–100 words, "
|
| 35 |
-
f"
|
|
|
|
| 36 |
)
|
| 37 |
|
| 38 |
# Generate raw story
|
| 39 |
raw = storyer(
|
| 40 |
prompt,
|
| 41 |
-
max_new_tokens=
|
| 42 |
temperature=0.7,
|
| 43 |
top_p=0.9,
|
| 44 |
no_repeat_ngram_size=2,
|
|
|
|
| 32 |
# Create prompt for story
|
| 33 |
prompt = (
|
| 34 |
f"Write a funny, warm children's story for ages 3-10, 50–100 words, "
|
| 35 |
+
f"in third-person narrative, that describes this scene exactly: {caption} "
|
| 36 |
+
f"mention the exact place, location or venue within {caption}"
|
| 37 |
)
|
| 38 |
|
| 39 |
# Generate raw story
|
| 40 |
raw = storyer(
|
| 41 |
prompt,
|
| 42 |
+
max_new_tokens=150,
|
| 43 |
temperature=0.7,
|
| 44 |
top_p=0.9,
|
| 45 |
no_repeat_ngram_size=2,
|