Update app.py
Browse files
app.py
CHANGED
@@ -53,10 +53,11 @@ def generate_item(tag, item_index):
|
|
53 |
Do not include additional commentary or options.
|
54 |
Use creative and varied language to ensure uniqueness.
|
55 |
"""
|
|
|
56 |
text_response = client.models.generate_content(
|
57 |
model='gemini-2.5-flash-preview-04-17',
|
58 |
contents=[prompt],
|
59 |
-
|
60 |
)
|
61 |
# Parse JSON response to extract the caption
|
62 |
try:
|
@@ -270,5 +271,5 @@ with gr.Blocks(
|
|
270 |
outputs=[current_tag, feed_items, feed_html]
|
271 |
)
|
272 |
|
273 |
-
# Launch the app
|
274 |
-
demo.launch()
|
|
|
53 |
Do not include additional commentary or options.
|
54 |
Use creative and varied language to ensure uniqueness.
|
55 |
"""
|
56 |
+
# Adjusted to pass temperature directly, assuming SDK supports it
|
57 |
text_response = client.models.generate_content(
|
58 |
model='gemini-2.5-flash-preview-04-17',
|
59 |
contents=[prompt],
|
60 |
+
temperature=1.2 # Pass temperature directly instead of generation_config
|
61 |
)
|
62 |
# Parse JSON response to extract the caption
|
63 |
try:
|
|
|
271 |
outputs=[current_tag, feed_items, feed_html]
|
272 |
)
|
273 |
|
274 |
+
# Launch the app with a public link
|
275 |
+
demo.launch(share=True)
|